Linewidth for function step?

87 ビュー (過去 30 日間)
Brandon Luciano
Brandon Luciano 2018 年 2 月 24 日
コメント済み: Jose Julio 2025 年 3 月 31 日
I plotted something but not sure why I can't adjust the linewidth of the result of the plot. I was able to change colors but linewidth doesn't change.
step(value_1);
set(value_1, 'LineWidth', 2);

採用された回答

Star Strider
Star Strider 2018 年 2 月 24 日
Get the outputs of the step function, then plot them using a plot call:
[y,t] = step(value_1);
figure
plot(t, squeeze(y), 'LineWidth',2)
grid
The Control System Toolbox plot functions do not allow you to alter their properties easily, if at all.

その他の回答 (1 件)

Erick Oberstar
Erick Oberstar 2021 年 3 月 20 日
This technique works for step, impulse, nyquist, and bode plots
LineWidth = 3;
s = tf(s)
sys = 1/(s+1)
figure; step/impulse/nyquist/bode(sys)
set(findall(gcf,'type','line'),'linewidth',LineWidth);
  2 件のコメント
Ajay Vaishnav
Ajay Vaishnav 2021 年 12 月 4 日
Thanks! It works.
Jose Julio
Jose Julio 2025 年 3 月 31 日
Thanks

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

Community Treasure Hunt

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

Start Hunting!

Translated by