% this program is used to demo modeling of a 2-order systerm.k=10;wn=2;xi=[0.1,0.2,0.3,0.4,1/sqrt(2),1,3,5,7];sys1=tf([k*wn^2],[1 2*xi(1)*wn wn^2])step(sys1)hold on %继续在打开的窗口上绘图for i=2:length(xi) sys1=tf([k*wn^2],[1 2*xi(i)*wn wn^2]) step(sys1)endhold off %停止在打开的窗口上绘图axis([0 25 0 20])grid %添加坐标网格legend对这个程序,我已经运行出来了,但是我想让它运行到第几行它就运行到第几行?该怎么操做,谢谢各位大哥们帮忙。
|