필터 지우기
필터 지우기

How to use timer and To Workspace

조회 수: 3 (최근 30일)
A
A 2021년 8월 26일
편집: A 2021년 8월 26일
I want to run Simulink, use To Workspace to get data, and then use the values in the data to compute and find a value.
However, I have read that To Workspace does not make the data available until the simulation is paused or stopped.
I would like to compute and obtain a value in the middle of a run, or in real time, as Simulink starts and ends in 7 minutes.
So, using a timer, after 3 minutes from the start of the run, stop the run once, and when the data in the To Workspace becomes available, perform the calculation and find a value.
However, since we are using an if statement in the middle of the calculation, if the condition is not satisfied, we want to release the stop and simulate the remaining 4 minutes.
Alternatively, I would like to use To Workspace to display the variable names in the base workspace from the start of the run, so that the data can be retrieved and used in the calculation in real time.
It would be appreciated if you could include the programme in your answer.

답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by