Importing elements of a structure from MATLAB workspace based on a user given constant in Simulink.
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have various structures in my MATLAB workspace. Each of them consists of 6 fields of 'double' type. I want to pass one of these structures to a function in simulink based on what value is selected for a particular constant.
Example:
I have two structures labelled ABC and DEF. ABC has 6 fields called ABC.a, ABC.b, ABC.c, ABC.d, ABC.e and ABC.f. Same goes for DEF.
Now if user inputs constant 1 in a user input block in simulink, I want to pass the structure 'ABC' to a matlabfunciton block in simulink otherwise i wanna pass structure 'DEF'.
What would be an efficient way to do it?
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!