Can I change the Simulink default settings in bode plots like frequency unit in Hz instead rad/s and define a fix frequency range in "Model Linearizer"?

23 次查看(过去 30 天)
Hello,
I would like to change the default settings described in the title, because I need to create different Bode plots with the same settings in Hz and a fixed frequency range.
At the moment I have to reset these settings in each study.
Thanks for the answer

回答(1 个)

vidyesh
vidyesh 2024-4-23
Hi Rai,
  • You can change the unit of frequency in the plots using the 'Toolbox Preferences Editor'.
"The Toolbox Preferences editor allows you to set plot preferences that will persist from session to session."
  • For setting a fixed frequency range for multiple plots, you can download all the plots as MATLAB figures (.FIG) and then run the below script to set the frequency range.
%List of all figures
fig_list = ["fig1.fig", "fig2.fig", "fig3.fig"];
for i = 1:numel(fig_list)
curr_fig = fig_list(i); %Open a figure
q = open(curr_fig);
ax = q.CurrentAxes;
ax.XLim = [3 8]; %Set the desired range
%saveas(gcf,curr_fig); % Overwrite the figure
close %Close the figure
end
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Plot Customization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by