Linewidth for function step?

조회 수: 66 (최근 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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by