Default bode axis to Hz in R2024b

61 次查看(过去 30 天)
Harm Weerts
Harm Weerts 2024-10-24,10:21
评论: Star Strider 2024-10-25,10:01
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.

回答(1 个)

Star Strider
Star Strider 2024-10-24,10:58
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.
Another option is to put this in your startup file.
  6 个评论
Harm Weerts
Harm Weerts 2024-10-25,7:01
According to support it is a known bug in R2024b. My guess is due to the change that is listed in the control systems release notes. The workaround is to specify the bode options explicitly with bode(ss(1),bodeoptions('cstprefs')).
Star Strider
Star Strider 2024-10-25,10:01
That was my impression as well.

请先登录,再进行评论。

标签

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by