Setting default values for bodeoptions
12 views (last 30 days)
Show older comments
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.)
0 Comments
Answers (2)
Star Strider
on 16 Dec 2020
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).
mitchell scott
on 21 Apr 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).
0 Comments
See Also
Categories
Find more on Plot Customization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!