MATLAB Answers

How to plot step response of second order system?

132 ビュー (過去 30 日間)
theblueeyeswhitedragon 2019 年 2 月 4 日
コメント済み: madhan ravi 2019 年 2 月 4 日
omgNot = 1;
zetaNot = 0.6;
H = tf(omgNot^2,[1, 2*zetaNot*omgNot, omgNot^2]);
I am using the code above to plot the step response of a second order system, but I am getting the follwoing error
Invalid default value for property 'InputName_' in class
Attempt to execute SCRIPT strings as a function:
I would really appreciate your help. Thank you.
  7 件のコメント
madhan ravi
madhan ravi 2019 年 2 月 4 日
The best option is to contact mathworks support team by clicking the Contact Us button on the top right corner if this page. And finally post the solution (the reason) provided by them as an answer and accept it so it might be helpful for others.


回答 (1 件)

Hiroumi Mita
Hiroumi Mita 2019 年 2 月 4 日
Do you have any MATLAB workspace variables pre-defined and the name is such as,'tf' ,'sterpplot', or ' DynamicSystem'?
Needless to say, double defined same name of pre-defined functions and workspace variable is prohibited.
The reason is priority of workscape name and functionname depends on the prioirty of MATLAB path.
If you have 'tf' where is in MATLAB workspace variable , this is the highest priority.
Second, if you have 'tf' function or other famous name's function you personally programed in current directory which name is same as functions as provided by toolboxes , the function located in current directory has higher priority than Toolboxes.
Please check above.
In my environment , your scriput runs normally.
  1 件のコメント
madhan ravi
madhan ravi 2019 年 2 月 4 日
It would have been crystal clear when typing
which ... -all
as the OP has posted the results of it , neither it is a variable or a custom made function/script. Possible reason could be that the OP has made some changes in the default script file.





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by