« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Built-in Signal Processing
Visualization of a Chirp Z Transform
Compute and visualize the magnitude and path of a chirp Z transform of a moving-average filter.
In[1]:=
X
X[z_] = 1/5 + 1/(5 z^4) + 1/(5 z^3) + 1/(5 z^2) + 1/(5 z);
In[2]:=
X
a = 0.889919 + 0.646564 I; w = 0.886924 + 0.367376 I; mag = Abs@DiscreteChirpZTransform[ConstantArray[1/5, 5], 31, w, a]; path = N[{Re[#], Im[#]}] & /@ Table[a w^k, {k, 0, 30}];
In[3]:=
X
Show[{ListPointPlot3D[Flatten /@ Thread[{path, mag}] , Filling -> 0, FillingStyle -> Directive[{Red, Thickness[Large]}], PlotStyle -> Directive[{Red, PointSize[Large]}], PlotRange -> All, ImageSize -> Medium], Graphics3D[{Red, Line[Flatten /@ Thread[{path, mag}]]}], Plot3D[Abs[X[x + I y]], {x, -1, 1}, {y, -1, 1}, PlotStyle -> Opacity[0.6], Mesh -> 0, MeshFunctions -> {(#1^2 + #2^2) &}, PlotRange -> {0, 30}]}]
Out[3]=