声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 999|回复: 0

[编程技巧] 大家进来看看,这个程序为什么运行不了呢?谢谢

[复制链接]
发表于 2006-6-21 11:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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>
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-25 11:23 , Processed in 0.054390 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表