find函数 matlabsys2=tf([1],[1,0.6,1]);t=0:0.01:20;y=step(sys2,t);plot(t,y),grid;[ym,km]=max(y);line(t(km),ym,'marker','.',...'markeredgecolor','r','markersize',20);ystr=['ymax=',sprintf('%1.6g\',ym)];tstr=['tmax=',sprintf('%1.4g\',t(km))];text(t(km
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/08 14:17:29
find函数 matlabsys2=tf([1],[1,0.6,1]);t=0:0.01:20;y=step(sys2,t);plot(t,y),grid;[ym,km]=max(y);line(t(km),ym,'marker','.',...'markeredgecolor','r','markersize',20);ystr=['ymax=',sprintf('%1.6g\',ym)];tstr=['tmax=',sprintf('%1.4g\',t(km))];text(t(km
find函数 matlab
sys2=tf([1],[1,0.6,1]);t=0:0.01:20;
y=step(sys2,t);plot(t,y),grid;
[ym,km]=max(y);
line(t(km),ym,'marker','.',...
'markeredgecolor','r','markersize',20);
ystr=['ymax=',sprintf('%1.6g\',ym)];
tstr=['tmax=',sprintf('%1.4g\',t(km))];
text(t(km),ym,{ystr;tstr});
ttt1=t(find(abs(y-1)>0.05));ts=max(ttt1);
ttt2=t(find(abs(y-1)=0));tr=min(ttt2);
hold on;
plot(ts,0.95,'bo','MarkerSize',10);
text(ts+1.5,0.95,['ts=',num2str(ts)]);
plot(tr,1,'bo','MarkerSize',10);
text(tr,1-0.1,['tr=',num2str(tr)]);
ttt2=t(find(abs(y-1)=0));tr=min(ttt2);
|
Error:The expression to the left of the equals sign is not a valid target for an assignment.求大侠问题怎样改正,顺便怎样更好地求系统的上升时间.
find函数 matlabsys2=tf([1],[1,0.6,1]);t=0:0.01:20;y=step(sys2,t);plot(t,y),grid;[ym,km]=max(y);line(t(km),ym,'marker','.',...'markeredgecolor','r','markersize',20);ystr=['ymax=',sprintf('%1.6g\',ym)];tstr=['tmax=',sprintf('%1.4g\',t(km))];text(t(km
abs(y-1)==0而不是abs(y-1) = 0, 你这个是判断语句,不是赋值语句