How to change units in Bode Diagram?

79 views (last 30 days)
I want to change the units of frequency and magnitude in the Bode Diagram, how can I do this?

Accepted Answer

MathWorks Support Team
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,

More Answers (0)

Products


Release

R2011b

Community Treasure Hunt

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

Start Hunting!