⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ljdt.m

📁 信号与系统分析及MATLAB实现一书中的所有源代码
💻 M
字号:
function ljdt(A,B)
% The function to draw the pole-zero diagram for discrete system
p=roots(A);                                   %求系统极点
q=roots(B);                              	   %求系统零点
p=p';									       %将极点列向量转置为行向量
q=q';								    	   %将零点列向量转置为行向量
x=max(abs([p q 1]));							%确定纵坐标范围
x=x+0.1;
y=x;											%确定横坐标范围
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(q),imag(q),'o')						%画零点
title('pole-zero diagram for discrete system')	%标注标题
hold off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -