How to change units in Bode Diagram?
79 views (last 30 days)
Show older comments
MathWorks Support Team
on 9 Aug 2016
Edited: MathWorks Support Team
on 16 Sep 2024
I want to change the units of frequency and magnitude in the Bode Diagram, how can I do this?
Accepted Answer
MathWorks Support Team
on 16 Sep 2024
Edited: MathWorks Support Team
on 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,
0 Comments
More Answers (0)
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!