Default bode axis to Hz in R2024b
Show older comments
Since matlab R2024b the bode command creates my plots in rad/s instead of Hz. In the past I used to set the default axis to Hz by setting cstprefs. Now this doesn't work anymore and I have to manually change every bode plot to Hz. Any suggestions on how to set the default in this version?
This code in R2022b gives a plot in Hz, and in R2024b gives it in rad/s
set(cstprefs.tbxprefs,'FrequencyUnits','Hz','grid','on');
bode(ss(1))
Edit: The set command normally runs as part of the startup script, and hence sets a default option. Here I placed it like this to reproduce the issue.
Answers (1)
Star Strider
on 24 Oct 2024
1 vote
I did not see any changes to that in the Release Notes, however that does not mean that they were not changed. The only relevant reference I can find is Specify Plotting Preferences for Linear Analysis and Specify Toolbox Preferences for Linear Analysis Plots and nothing that uses the syntax that you posted. They in turn refer to the ctrlpref function.
6 Comments
Harm
on 24 Oct 2024
Star Strider
on 24 Oct 2024
I was not able to find more in the documentation than I posted. (I usually define 'Frequencyunits' when I use a specific plot, such as bodeplot or define them in the system itself when I create it.)
Harm
on 24 Oct 2024
Star Strider
on 24 Oct 2024
Edited: Star Strider
on 24 Oct 2024
Harm
on 25 Oct 2024
Star Strider
on 25 Oct 2024
That was my impression as well.
Categories
Find more on Get Started with Control System Toolbox 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!