Skip failed simulink result in a loop

조회 수: 2 (최근 30일)
Josh
Josh 2019년 9월 25일
댓글: Mohamad Omar Mansour 2019년 10월 1일
I am running a Simulink model from a MATLAB script. The script has a loop that changes some variables and reruns the simulink model. For certain excecutions of the loop, the simulink model has a fatal error and the script ends.
Is there a way to attemtp to excecute the simulink model, but if it fails continue on to the next excecution of the loop? I tried using the sim() command within a try/catch, but I had the same error.
Thank you.
  댓글 수: 1
Mohamad Omar Mansour
Mohamad Omar Mansour 2019년 10월 1일
I have the same problem. I have a matlab function block inside simulink, and I use a while loop.
During some iterations, I want to skip the current iteration via the "continue" command as you did.
However, my model freezes; it says it is "Running" but no data is being processed

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by