複数のボード線図に対して一つのレジェンドを付ける方法
20 ビュー (過去 30 日間)
古いコメントを表示
例えば下記のように複数のボード線図に対して,一つのレジェンドを付けたいのですが,方法を教えてください.
for i = 1:10
sys1 = tf(i,[1 1])
bode(sys1, 'b-')
hold on
end
sys2 = tf(20,[1 1])
bode(sys2, 'r--')
上記に対して,10個のボード線図(青の実線)にsys1,1個のボード線図(赤の破線)にsys2のようにレジェンドを付けたいです.
0 件のコメント
採用された回答
Dyuman Joshi
2023 年 10 月 23 日
Working with bode-plot figures is difficult.
A (simple) approach is to use empty strings for the rest of the plots
figure
hold on
for i = 1:10
sys1 = tf(i,[1 1]);
bode(sys1, 'b-');
end
sys2 = tf(20,[1 1]);
bode(sys2, 'r--');
legend({'', '', '', '', '', '', '', '', '', 'Sys1', 'Sys2'})
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!