missing parameter to change fixed step size via code
显示 更早的评论
Hey there,
i just want to know, how the hell i can set fixed-step size programmatically.
If I'm glancing here
and here
with

so far i cannot really get a clearly parameter name to set the following value via code.
But obviously i could set it manually in the model properties tab.

So there have to be aaaannnny parameter, which is changing this 0.1 via code, but i cannot find it.
when i'm trying ...
mdl = 'blaaa';
open_system(mdl);
% load configuration:
mdlConfObj = getActiveConfigSet(mdl);
% read some parameters:
get_param(mdlConfObj,'StartTime')
get_param(mdlConfObj,'StopTime')
get_param(mdlConfObj,'fundamental sample time')
get_param(mdlConfObj,'Fixed-step size')
get_param(mdlConfObj,'fixed-step size')
get_param(mdlConfObj,'fixed step')
get_param(mdlConfObj,'step')
...and many more
% set some parameter:
set_param(mdlConfObj,'StartTime',"0")
set_param(mdlConfObj,'StopTime',"45")
set_param(mdlConfObj,'SolverType','Fixed-Step');
set_param(mdlConfObj,'fundamental sample time')
...
% setActiveConfigSet(mdl,'mdlConfObj'); % not yet
there is no way. i always get alerts like this
Property 'Fixed-step size' does not exist
Does anybody know what i have to type to get the damn 0.1 changed (via script!!!) ? This is so badly documented..
many thanks
regards
1 个评论
Diego
2025-4-28
SLout = sim('blaaa', StartTime='0', StopTime='45', SolverType='Fixed-Step', FixedStep='.1');
reference (see "Programmatic Use" at the bottom of these pages):
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Scopes and Data Logging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!