フィルターのクリア

Setting default values for bodeoptions

13 ビュー (過去 30 日間)
Balazs Fischer
Balazs Fischer 2020 年 12 月 16 日
回答済み: mitchell scott 2022 年 4 月 21 日
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.)

回答 (2 件)

Star Strider
Star Strider 2020 年 12 月 16 日
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 件のコメント
Balazs Fischer
Balazs Fischer 2021 年 2 月 3 日
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.

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


mitchell scott
mitchell scott 2022 年 4 月 21 日
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).

カテゴリ

Help Center および File ExchangeGet Started with Control System Toolbox についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by