我想绘制一个zplot,在Matlab中显示一个单位圆,以0为中心以及绘图的极点和零点。我不允许使用任何其他matlab函数,例如zplane或pzplot来执行此操作。到目前为止,我可以绘制一个单位圆,但我无法让我的绘图显示更多的坐标轴而不会扭曲我的圆。我也有一段时间了解我的功能的极点和零点,以及如何在我的情节中显示极小的x和零的极点。任何帮助将不胜感激!我的任务看起来像这样,并且必须正确处理诸如使用Matlab绘制zplot
zplot([0 1 1],[0 1]); zplot([0 1 1],[0 0 1]);
function zplot(b, a)
% ZPLOT Plot a zero-pole plot.
-1 -nb
B(z) b(1) + b(2)z + .... + b(nb+1)z
H(z) = ---- = ---------------------------------
-1 -na
A(z) a(1) + a(2)z + .... + a(na+1)z
% zplot(b, a) plots the zeros and poles which determined by vectors b and a
% The plot includes the unit circle and axes for reference, plotted in black.
% Each zero is represented with a blue 'o' and each pole with a red 'x' on the
%plot.
xmin;
xmax;
ymin;
ymax;
% vector of angles at which points are drawn
angle = 0:2*pi/100:2*pi;
% Unit radius
R = 1;
% Coordinates of the circle
x = R*cos(angle);
y = R*sin(angle);
% Plot the circle
plot(x,y);
axis ([xmin, xmax, ymin, ymax]);
grid on;
end
问题的屏幕截图?一个样本系统或一组要测试的极点/零点? – krisdestruction
它应该能够正确处理诸如:zplot([0 1 1],[0 1]); zplot([0 1 1],[0 0 1]); – KarmaPimp
请用上面的方法更新你的问题。请同时发布可视化问题的截图。 – krisdestruction