필터 지우기
필터 지우기

Export states to workspace in simulink configuration parameters

조회 수: 1 (최근 30일)
Pouya Jamali
Pouya Jamali 2012년 11월 17일
when I choose to export the states to workspace in my Simulink Blockdiagram a variable is built in the workspace with the name "sout" this variable is a double variable which has a lot of columns. How can I realize that which column does relate to the desired state? My MATLAB engine is R2012b.

채택된 답변

Ryan G
Ryan G 2012년 11월 19일
On that page you'll see some parameters you can set programatically to find more information when you save the state:
set_param(mdl, 'SaveFinalState', 'on', 'FinalStateName',...
[mdl 'SimState'],'SaveCompleteFinalSimState', 'on');
This will save the state as mdlNameSimState and you can find the names of the states using:
mdlNameSimState.loggedStates.blockName
or
mdlNameSimState.loggedStates.stateName
The states in the form you are saving them as are useful for easy access since it is simply vector in the proper order for the model to be easily manipulated or stored.

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by