How can I programmatically call "exampleModel(...,'compile')" using a variable for my model name?
조회 수: 11 (최근 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!