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
colormap(cool)
xlabel('Re')
ylabel('Im')
ww=-pi:pi/25:pi;
[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.