How to change units in Bode Diagram?

79 Ansichten (letzte 30 Tage)
MathWorks Support Team
MathWorks Support Team am 9 Aug. 2016
I want to change the units of frequency and magnitude in the Bode Diagram, how can I do this?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 16 Sep. 2024
Bearbeitet: MathWorks Support Team am 16 Sep. 2024
There are 3 ways to change the units of a Bode Plot.
A. After MATLAB R2024b, you can use the property API directly. For example, the following codes change the "FrenquencyUnit" to "Hz"
h = bodeplot(sys); h.FrequencyUnit = "Hz";
For more information related to customizing the properties, please refer to the following link
B.
Using the Property Editor GUI 
1. In the opened Bode Diagram figure window, go to View -> Property Editor
2. Click on any of the Axes
3. In the 'Property Editor - bodeplot' section, select 'More Properties'. A new Property Editor window opens up.
4. In the 'Units' tab, you would be able to select the Units of Frequency, Magnitude and Phase
C. 
For releases before R2024b, you may also use the 'setoptions' functions for 'bodeplot' objects. For example, to change the frequency to 'Hz', use the following command:
h = bodeplot(sys); setoptions(h,'FreqUnits','Hz')
For more information about setoptions and how to change properties of a bode diagram from command line, please refer to the following documentation link,

Weitere Antworten (0)

Kategorien

Mehr zu Plot Customization finden Sie in Help Center und File Exchange

Produkte


Version

R2011b

Community Treasure Hunt

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

Start Hunting!

Translated by