How can I programmatically call "exampleMo​del(...,'c​ompile')" using a variable for my model name?

11 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
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 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by