필터 지우기
필터 지우기

Is there a way to check the data being sent to workspace from my Simulink model so I can choose to stop the simulation?

조회 수: 2 (최근 30일)
I have a Simulink Multibody model that outputs position data to the workspace after it is done simulating. I have been running the simulation using the sim() command in a MATLAB script. Is there a way that I can run the simulation in MATLAB while checking the position output and then stop the simulation after I have reached a certain position? Thank you.
  댓글 수: 1
Alison Goldsmith
Alison Goldsmith 2019년 7월 8일
Instead of checking outputs in the workspace I used a switch in my simulink model to stop the simulation when a certain threshold was reached.

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

답변 (1개)

Chidvi Modala
Chidvi Modala 2019년 7월 17일
I understand that you want to stop Simulink simulation when a certain condition is met.
Use the Stop Simulation block with an appropriate logical input to the block.
Alternately you can use Assertion block to halt the simulation and display an error message.

카테고리

Help CenterFile Exchange에서 Simscape Multibody에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by