Croaker
|
That plot didn't get saved so well...
Here is the Matlab code (I found on the web) which you can modify to plot whatever. Modify the num and den vector...these are the transfer function co-efficients.
% Figure 3.2 % % BM Mar 98
clear clf colordef(1,'black')
rx = -5:0.1:5; ix = -5:0.1:5; [rrx,iix] = meshgrid(rx,ix); xx = rrx + j*iix;
num = [0.25 1]; den = [ 1 ]; z = zeros(size(xx)); nn = max(size(rx)); for jj = 1:nn z(:,jj) = polyval(num,xx(:,jj))./polyval(den,xx(:,jj)); end h = surf(rx,ix,20*log10(abs(z)));hold plot3([-1 -1 ],[ -2 -2 ],[-30 10 ]) plot3([-1 -1 ],[ 2 2 ], [ -30 10 ])
xlabel('real') ylabel('imag') zlabel('magnitude (dB)') view([50,40]); fprintf(1,'Figure 3.2: press return to rotate\n') pause
rotvec = 50:5:90; ss = max(size(rotvec)); step = 30/(ss-1); hvec = 40:-step:10; for ii = 1:length(rotvec) set(gca,'View',[rotvec(ii) hvec(ii)] ) drawnow pause(2); end
|