📄 ex_2.m
字号:
%ex_2
clear all;
a=[3 -1 0 0 0 1];
b=[1 1];
%
p=roots(a) %求系统极点
z=roots(b) %求系统零点
p=p'; %将极点列向量转置为行向量
z=z'; %将零点列向量转置为行向量
x=max(abs([p z 1])); %确定纵坐标范围
x=x+0.1;
y=x; %确定横坐标范围
figure(1)
clf
hold on
axis([-x x -y y]) %确定坐标轴显示范围
w=0:pi/300:2*pi;
t=exp(i*w);
plot(t) %画单位园
axis('square')
plot([-x x],[0 0]) %画横坐标轴
plot([0 0],[-y y]) %画纵坐标轴
text(0.1,x,'jIm[z]')
text(y,1/10,'Re[z]')
plot(real(p),imag(p),'x') %画极点
plot(real(z),imag(z),'o') %画零点
title('pole-zero diagram for discrete system') %标注标题
hold off
%
[z,p]=tf2zp(b,a)
figure(2)
zplane(z,p),title('pole-zero diagram for discrete system')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -