请那位大神解释一下这一段MATLAB代码的意思!!!
sys=tf([2],[1,0.6,2]);t=0:0.01:20;y=step(sys,t);plot(t,y);[ym,km]=max(y);line(t(km),y...
sys=tf([2],[1,0.6,2]);t=0:0.01:20;y=step(sys,t);plot(t,y);
[ym,km]=max(y);
line(t(km),ym,'marker','.','markeredgecolor','r','markersize',20);
ystr=['ymax=',sprintf('%1.6\',ym)];tstr=['tmax=',sprintf('%1.4g\',t(km))];
text(t(km),ym,{ystr,tstr});
ttt=t(find(abs(y-1)>0.05));ts=max(ttt);
hold on;plot(ts,0.95,'bo','MarkerSize',10);hold off
text(ts+1.5,0.95,['ts=',num2str(ts)]),grid 展开
[ym,km]=max(y);
line(t(km),ym,'marker','.','markeredgecolor','r','markersize',20);
ystr=['ymax=',sprintf('%1.6\',ym)];tstr=['tmax=',sprintf('%1.4g\',t(km))];
text(t(km),ym,{ystr,tstr});
ttt=t(find(abs(y-1)>0.05));ts=max(ttt);
hold on;plot(ts,0.95,'bo','MarkerSize',10);hold off
text(ts+1.5,0.95,['ts=',num2str(ts)]),grid 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询