stepplot systems name

21 ビュー (過去 30 日間)
Ale
Ale 2011 年 5 月 5 日
I use stepplot to generate step response plots, rather than just simply "step", as this allows me to change titles, labels and so on by just running a script instead of changing them in the property editor everytime.
I am hoping someone can kindly help me on naming of the systems name when using stepplot.
More specifically if this is what I am doing:
stepplot(SysMatrices.tf_Pn_Pnc, 10);
Can I then change the Systems name through some other way rather than changing the first argument.

採用された回答

Teja Muppirala
Teja Muppirala 2011 年 5 月 6 日
For one system:
sys = rss(3);
h = stepplot(sys1);
h.Response.Name = 'Bill';
Or multiple systems:
sys1 = rss(3);
sys2 = rss(3);
h = stepplot(sys1,sys2);
h.Response(1).Name = 'Mike';
h.Response(2).Name = 'Rudolph';
  1 件のコメント
Arnaud Miege
Arnaud Miege 2011 年 5 月 6 日
Cool

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

その他の回答 (1 件)

Arnaud Miege
Arnaud Miege 2011 年 5 月 5 日
Is this just annotate the plot? If so, you can use legend:
sys = rss(3);
sys2 = rss(4);
stepplot(sys,sys2);
legend('sys1','sys2')
If that doesn't answer your question, can you clarify wheat you mean?
HTH,
Arnaud
  2 件のコメント
Ale
Ale 2011 年 5 月 5 日
Thanks for the answer Arnaud...
What I am getting at is that when I turn on the characteristics like peak response (by doing right click on the graph) can I change the name next to "System" without changing the names in the argument of the stepplot function.
so for example, (if sys is already a tf):
for k = 1:10
sys = k*sys;
stepplot(sys)
%% some function here to change that "sys" name???
end
Thanks Again,
Allen
Arnaud Miege
Arnaud Miege 2011 年 5 月 6 日
Not that I could find out, I think it takes whatever the name of the variable it's plotting to be the system name. You can, however, rename the I/O:
sys = tf(1,[1 1]);
for k = 1:10
sys_k(k) = k*sys;
end
h = stepplot(sys_k);
input_names = get(h,'InputName');
input_names{1} = 'My first input';
set(h,'InputName',input_names);
and the same with 'OutputName'.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by