発散する結果をfig​ureにプロットした​時のグラフが外にはみ​出る現象の解決方法

例えば以下のようなシステムのステップ応答をプロットすることを考えます。
P = tf(1,[1 1 1])
C = tf(5,[1 0])
G=C*P/(1+C*P)
step(G)
ylim([0 1])
このとき,約90秒のあたりで,プロットがグラフ外にはみ出てしまいます。
これをはみ出ないようにしたいのですが,解決方法をご存じでしょうか?
よろしくお願いいたします。

6 Comments

ylim([0 1])
を無くしてみればどうでしょうか?
貴弘
貴弘 on 21 Nov 2023
おっしゃる通りなのですが,他の図との比較などで軸を合わせたい場合もありますので,対策できないのかなと思った次第です。
Dyuman Joshi
Dyuman Joshi on 21 Nov 2023
@Hiro Yoshino, the question should be why is the output like that when we modify the y-limits?
The behaviour seems bug-ish.
Is what you meant the following?
It seems, as you mentioned, bug-ish.
P = tf(1,[1 1 1])
P = 1 ----------- s^2 + s + 1 Continuous-time transfer function.
C = tf(5,[1 0])
C = 5 - s Continuous-time transfer function.
G=C*P/(1+C*P)
G = 5 s^3 + 5 s^2 + 5 s ----------------------------------------- s^6 + 2 s^5 + 3 s^4 + 7 s^3 + 6 s^2 + 5 s Continuous-time transfer function.
step(G)
ylim([0 1])
Hiro Yoshino
Hiro Yoshino on 21 Nov 2023
Bug-report を出しておきました。
Dyuman Joshi
Dyuman Joshi on 21 Nov 2023

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Release

R2023a

Tags

Asked:

on 20 Nov 2023

Commented:

on 21 Nov 2023

Community Treasure Hunt

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

Start Hunting!