How to run Simulink Model File From Script file ?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a GUI where I choose a file to be simulated using a browse Option(Push Button), Am not able to simulate the file which I choose using the codes but if I specifically write the code like sim ('test_new01') am able to simulate. But when its sim('filename') am not able to simulate the file (that line code because name changes every time I choose different model file)
댓글 수: 0
답변 (2개)
KL
2017년 5월 23일
save the return in a cell array and use it.
filename{1,1} = get(handles.edit1,'String');
sim(filename{1,1});
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!