巧用pause,一次性画出多个系统的阶跃响应

num=1;
den1=[0.5 1 2 4 6 8];
hold;

for i=1:6
step(tf(num,[den1(i), 1]));
pause(2);
end
legend(num2str(den1(1)),num2str(den1(2)),num2str(den1(3)),num2str(den1(4)),num2str(den1(5)),num2str(den1(6)))

结果:

 

posted @ 2024-06-05 17:43  叕叒双又  阅读(3)  评论(0编辑  收藏  举报