Effacer les filtres
Effacer les filtres

Setting default values for bodeoptions

13 vues (au cours des 30 derniers jours)
Balazs Fischer
Balazs Fischer le 16 Déc 2020
Hello,
I know I can override the default values for bode by using
P=bodeoptions;
P.whatever='foo';
bode(system,P);
But I don't want to add to every bode command the additional parameters and want others working with my skripts to be able to display the bode plots how they prefer them. How can I set the default value of bode options? I'm looking for a command like changing the default linewidth
set(groot,'defaultLineLineWidth',2)
but for bode plots (and step responses and nichols plots etc.)

Réponses (2)

Star Strider
Star Strider le 16 Déc 2020
See if the setoptions function will do what you want.
Beyond that, I doubt there is a way to set the defaults. The closest it is likely possible to get is described in the bodeoptions documentation section on Create Bode Plot with Custom Settings and see if it will do what you want (assuming you are not already aware of it, although you did not mention having seen it or experimented with it in your Question).
  1 commentaire
Balazs Fischer
Balazs Fischer le 3 Fév 2021
Thanks for the answer, I have looked at the documentation of setoptions and bodeoptions but it seems what I want is not possible. It is weird that Mathworks made it possible to set defaults for plots but not for specialised plots like bode.

Connectez-vous pour commenter.


mitchell scott
mitchell scott le 21 Avr 2022
I was also wondering this same thing, I found out you can set the defaults in the Contol Systems toolbox and then call
opts = bodeopts('cstprefs')
bode(sys, opts)
This is not much better but I though it was cleaner than setting all the options I wanted. theres more info about this if you search Control Systems toolbox editor in the matlab Documentation search bar (upper right for me).

Catégories

En savoir plus sur Get Started with Control System Toolbox dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by