巧用pause,一次性畫出多個系統的階躍響應

叕叒双又發表於2024-06-05

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)))

結果:

相關文章