How can I programmatically call "exampleModel(...,'compile')" using a variable for my model name?
12 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2017 年 5 月 12 日
回答済み: MathWorks Support Team
2017 年 5 月 12 日
How can I programmatically call "exampleModel([],[],[],'compile')" using a variable for my model name?
採用された回答
MathWorks Support Team
2017 年 5 月 12 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!