Simulink loading- and simulation-procedure from Matlab script considering variant subsystems.
显示 更早的评论
Hi there,
I'm currently wondering about when Simulink models Variant-Systems are evaluated when calling "load_system" to load a model inside a script.
My current approach is
function result = some_method( self )
h = load_system('foo');
hws = get_param (model, 'modelworkspace');
hws.assignin('sim_config', self);
result = sim('foo', ...);
end
Now I've got multiple problems with that.
- How does the "sim" command actually know the "h" model handle and use that instance, since I only pass the model name? - Is it not too late to define the workspace variables afer the load_system call, especially considering variant subsystems? - Is "load_system + sim" the intended pattern for what I'm doing?
Kind Regards, Michael
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Component-Based Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!