experiment4_s.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 28 行
M
28 行
%close all,clear;
figure(1)
t=0:0.01:6;
num=[1];%input('Type in the coefficient vector of the numerator polynomial of H(s):num=');
den=[1 5 8 4];%input('Type in the coefficient vector of the denominator polynomial of H(s):den=');
z=roots(num);
p=roots(den);
z=z';p=p';
h=impulse(num,den,t);
disp('The zeros of the system are:')
z
disp('The poles of the systme are:')
p
[r,p,k]=residue(num,den);
disp('The expression of H(s) in partial fraction expansion form')
r=r'
p=p'
k
subplot(211)
pzmap(num,den)
subplot(212)
plot(t,h)
title('The impulse response h(t) of the system')
axis([0,5,min(h),max(h)])
xlabel('Time in second')
grid on
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?