Effacer les filtres
Effacer les filtres

Linewidth for function step?

157 vues (au cours des 30 derniers jours)
Brandon Luciano
Brandon Luciano le 24 Fév 2018
Commenté : Ajay Vaishnav le 4 Déc 2021
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);

Réponse acceptée

Star Strider
Star Strider le 24 Fév 2018
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.

Plus de réponses (1)

Erick Oberstar
Erick Oberstar le 20 Mar 2021
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);
  1 commentaire
Ajay Vaishnav
Ajay Vaishnav le 4 Déc 2021
Thanks! It works.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by