高手 谢谢你的回复, 有个回调函数 但是不能运行...
按钮dstep_pushbutton的回调程序如下:
- if q==1
- step(num,den); p=findobj('Tag','EditText1');
- systemstr = str2mat(...
- ' % Now it will get the step response of the system expressed by transfer function',...
- ' sys = tf(num,den);',...
- ' ');
- detailstr = str2mat(' ',' % Click on the line for response details');
- commandStr = str2mat(systemstr,...
- ' % Plot the step response of this system',...
- ' step(sys)',...
- detailstr);
- set(p,'String',commandStr);
- else
- step(a,b,c,d);
- p=findobj('Tag','EditText1');
- systemstr = str2mat(...
- ' % Now it will get the step response of the system expressed by state space model',...
- ' sys = ss(a,b,c,d);',...
- ' ');
- detailstr = str2mat(' ',' % Click on the line for response details');
- commandStr = str2mat(systemstr,...
- ' % Plot the step response of this system',...
- ' step(sys)',...
- detailstr);
- set(p,'String',commandStr);
- end
复制代码 |