⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 solver_profiling.m

📁 如何利用SIMULINK进行精确的建模
💻 M
字号:
%% Solver Profiling

%% Set the solver to save solver profile info

set_param(bdroot,'SolverProfileInfoName','stat')
set_param(bdroot,'SaveSolverProfileInfo','yes')

%% Display Time step size

h2 = findobj(0, 'Name', 'ABS Time Steps');
if isempty(h2),
  h2=figure(... %'Position',[26   239   452   257],...
           'Name','ABS Time Steps',...
           'NumberTitle','off');
end

figure(h2)

plot(tout(2:end),diff(tout))
title(['Model Step Size' 10 get_param(bdroot,'Solver') ' took ' num2str(length(tout)-1) ' steps'])
ylabel('Step Size(secs)')
xlabel('Time(secs)')
set(get(gca,'xlabel'),'FontSize',10);
set(get(gca,'ylabel'),'FontSize',10);
set(get(gca,'title'),'FontSize',10);

%%
set(gca,'YScale','log')
grid on

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -