马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
<P><FONT size=3><FONT face="Times New Roman">这个是离散控制系统计算机辅助设计 中 GUI界面是 阶跃响应step的回调函数:<BR><BR>if q==1 <BR></FONT></FONT><FONT face="Times New Roman" size=3>step(num,den); <BR>p=findobj('Tag','EditText1');</FONT></P>
<P><FONT face="Times New Roman" size=3>systemstr = str2mat(...</FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' % Now it will get the step response of the system expressed by transfer function',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' sys = tf(num,den);',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' ');</FONT></FONT></P>
<P><FONT face="Times New Roman" size=3>detailstr = str2mat(' ',' % Click on the line for response details');</FONT></P>
<P><FONT face="Times New Roman" size=3>commandStr = str2mat(systemstr,...</FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' % Plot the step response of this system',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' step(sys)',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> detailstr);</FONT></FONT></P>
<P><FONT face="Times New Roman" size=3>set(p,'String',commandStr);</FONT></P>
<P><FONT face="Times New Roman" size=3>else</FONT></P>
<P><FONT face="Times New Roman" size=3>step(a,b,c,d);</FONT></P>
<P><FONT size=3><FONT face="Times New Roman">
<br></FONT></FONT>
<p>
<P><FONT face="Times New Roman" size=3>p=findobj('Tag','EditText1');</FONT></P>
<P><FONT face="Times New Roman" size=3>systemstr = str2mat(...</FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' % Now it will get the step response of the system expressed by state space model',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' sys = ss(a,b,c,d);',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' ');</FONT></FONT></P>
<P><FONT face="Times New Roman" size=3>detailstr = str2mat(' ',' % Click on the line for response details');</FONT></P>
<P><FONT face="Times New Roman" size=3>commandStr = str2mat(systemstr,...</FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' % Plot the step response of this system',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> ' step(sys)',...</FONT></FONT></P>
<P><FONT size=3><FONT face="Times New Roman"> detailstr);</FONT></FONT></P>
<P><FONT face="Times New Roman" size=3>set(p,'String',commandStr);</FONT></P>
<P><FONT face="Times New Roman" size=3>end</FONT></P> |