Stop simulation in Matlab Fctn block
조회 수: 2 (최근 30일)
이전 댓글 표시
How can I stop simulation inside the ML Fctn block before it reach the end of the simulation time?
Thanks.
채택된 답변
Mischa Kim
2014년 4월 21일
편집: Mischa Kim
2014년 4월 21일
Use the Stop Simulation block. When the input for the block (e.g. output of your MATLAB Function block) goes to non-zero, the sim stops.
댓글 수: 2
Mischa Kim
2014년 4월 21일
편집: Mischa Kim
2014년 4월 21일
Sure, you can. If it is a simple "stop at a certain time" logic you can do without at MATLAB function (see model below from documentation). The sim stops at t = 10 sec, provided that the simulation time is greater or equal to 10 seconds.
If you need to use a MATLAB function please post more detailed info on what you are trying to implement.
추가 답변 (1개)
ozgun gunay
2018년 7월 26일
"Stop Simulation" block exits with exit(1) in generated code. This means there is a error for OS. Is there another way ending simulation without without exit(1).
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!