Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

3D Z-Transform Matlab

  1. Dec 19, 2013 #1
    Does anyone know how I might go about graphing the Z-Transform in 3D? It want it to look something like the picture below.

    Attached Files:

  2. jcsd
  3. Dec 22, 2013 #2


    User Avatar
    Gold Member

    Are you interested in knowing how to plot in 3D, or how to calculate the z transform? Do you have access to Symbolic Math Toolbox? If so, there are some helpful functions in it for doing z transforms. I don't think core MATLAB has a function for it but there is probably something on the file exchange. This may also be relevant:


    Otherwise, the plot you're looking at probably came from using meshgrid() and surf(), then overlaying the unit circle values with a call to plot3().
  4. Dec 25, 2013 #3
    More so plotting in 3d, I've never used meshgrid or surf before. I do have access to the Symbolic Toolbox. Would I have to use BOTH meshgrid() and surf()?

    Attached Files:

    • vh11.jpg
      File size:
      31.4 KB
    Last edited: Dec 25, 2013
  5. Dec 25, 2013 #4
    I have found this code from another site:

    xmin = -2; xstep = 0.1; xmax = 2;
    ymin = -2; ystep = 0.1; ymax = 2;
    x = xmin : xstep : xmax;
    y = ymin : ystep : ymax;
    [X,Y] = meshgrid(x,y);

    Z = 10*log10(abs(test(X + j*Y))); % here is the call to the function to be plotted.
    Z2 = abs(X + j*Y) <=1; % Here is the mask the zeros things outside the unit circle

    hold off
    surf(X, Y, Z) % Draw and label the surface


    [xn, yn, zn] = freqMove(0, ww);
    hold on
    plot3(xn, yn, zn)

    It generates the following error:

    Undefined function 'test' for input arguments of type 'double'.

    Error in hmm (line 7)
    Z = 10*log10(abs(test(X + j*Y))); % here is the call to the function to be plotted.

    Attached Files:

    Last edited: Dec 25, 2013
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Transform Matlab Date
Matlab Plotting Coordinate Transformations in Matlab Feb 12, 2018
Matlab Split-step Fourier method Apr 4, 2016
Matlab Matlab syntax for 2-d fourier transform Mar 21, 2016
Matlab Fourier transform of a 2D shape Mar 21, 2016
Using the Fourier Transform on Partitioned Images Dec 3, 2015