Importing elements of a structure from MATLAB workspace based on a user given constant in Simulink.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!