How can i get a model argument from the modelworkspace into a matlab skript?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I want a script that calculates certain parameters from variables that I defined in the modelworkspace of a simulink model.
How do I access these variables?
0 个评论
采纳的回答
Sebastian Castro
2015-5-19
wksp = get_param(mdl,'ModelWorkspace')
value = wksp.getVariable('K')
... where "mdl" is your model's name :)
- Sebastian
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!