rlocus throws up error

13 ビュー (過去 30 日間)
M Prabhu
M Prabhu 2021 年 8 月 7 日
コメント済み: Star Strider 2021 年 8 月 8 日
The root locus is not plotted and I get an error message as follows:
"NaN/Inf breakpoint hit for rlocusplot.m on line 83.
83 src = repmat(handle(NaN),nsys,1);"
For example,
>> sys = tf([2 5 1],[1 2 3]);
>> rlocus(sys)

採用された回答

Star Strider
Star Strider 2021 年 8 月 7 日
Something else is wrong somewhere. I have no idea as to suggesting where to look for the problem.
The example code works here:
sys = tf([2 5 1],[1 2 3]);
rlocus(sys)
First, see if closing and then re-starting MATLAB solves it.
.
  2 件のコメント
M Prabhu
M Prabhu 2021 年 8 月 8 日
Restarting Matlab solved the problem. But I have no idea why it happened in the first place. Thank you!
Star Strider
Star Strider 2021 年 8 月 8 日
I am happy that you got that sorted!
(I have no idea, either. I never encountered a similar situation with the Control System Toolbox, however re-starting MATLAB has solved similar problems in my experience.)
As always, my pleasure!
.

サインインしてコメントする。

その他の回答 (1 件)

Paul
Paul 2021 年 8 月 7 日
編集済み: Paul 2021 年 8 月 7 日
Seems to work fine:
sys = tf([2 5 1],[1 2 3]);
rlocus(sys);
You might have a different function tf() or rlocus() that is shadowing the same from the Control System Toolbox. Do you see these results in repsonse to a which() command?
which tf -all
/MATLAB/toolbox/control/ctrlmodels/@tf/tf.m % tf constructor /MATLAB/toolbox/control/ctrlmodels/@DynamicSystem/tf.m % Shadowed DynamicSystem method /MATLAB/toolbox/shared/controllib/engine/+ltipack/@tfdata/tf.m % Shadowed ltipack.tfdata method /MATLAB/toolbox/shared/controllib/engine/+ltipack/@ssdata/tf.m % Shadowed ltipack.ssdata method /MATLAB/toolbox/mpc/mpc/@mpc/tf.m % Shadowed mpc method /MATLAB/toolbox/ident/ident/@idParametric/tf.m % Shadowed idParametric method /MATLAB/toolbox/shared/controllib/engine/@StaticModel/tf.m % Shadowed StaticModel method
which rlocus -all
/MATLAB/toolbox/control/ctrlobsolete/rlocus.m /MATLAB/toolbox/control/ctrldesign/@DynamicSystem/rlocus.m % Shadowed DynamicSystem method /MATLAB/toolbox/shared/controllib/engine/+ltipack/@ltidata/rlocus.m % Shadowed ltipack.tfdata method /MATLAB/toolbox/shared/controllib/graphics/@resppack/@ltisource/rlocus.m % Shadowed resppack.ltisource method
  1 件のコメント
M Prabhu
M Prabhu 2021 年 8 月 8 日
Hi Paul. Unfortunately, I restarted Matlab before I could try your solution. After restarting, rlocus worked fine. Thank you !

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeClassical Control Design についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by