How can I programmatically call "exampleModel(...,'compile')" using a variable for my model name?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 12 Mai 2017
Réponse apportée : MathWorks Support Team
le 12 Mai 2017
How can I programmatically call "exampleModel([],[],[],'compile')" using a variable for my model name?
Réponse acceptée
MathWorks Support Team
le 12 Mai 2017
This is possible by doing the following:
1) Store the model name to a variable:
>> myModelVar = 'exampleModel';
2) Call the model function using the "eval" command as follows:
>> eval([myModelVar, '([], [], [], ''compile'');']);
This same method can be applied to a cell array of model names as well, if there are multiple models to compile.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Compiler 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!