MATLAB Answers

Data logging to workspace using to workspace block in fast restart mode

조회 수: 5(최근 30일)
Muhammad Ahsan Zamee
Muhammad Ahsan Zamee 28 Aug 2019
I have been trying to send data to workspace using 'to workspace' block in fast restart mode. but workspace fails to get anything. A variable nam 'SimulationOutput' does appears, but this one is completely empty. Thus cant get any data to process. any help will be highly appreciated!
Thanks

  댓글 수: 0

로그인 to comment.

답변 수 (1)

Urmila Rajpurohith
Urmila Rajpurohith 9 Sep 2019
Hi Muhammad,
You can follow the below steps to access results of a simulation of a model with “to workspace “block in fast restart mode.
simOut = sim('modelname’, 'StopTime', '10');
output= get(simOut, 'simout');
here “simout” is the variable name provided in “to workspace” Block parameters.
values=output.signals.values;
You can refer to below documentation for more information.https://www.mathworks.com/help/simulink/slref/simulink.simulationoutput-class.html

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by