필터 지우기
필터 지우기

How to get Data type of stateflow input through script?

조회 수: 5 (최근 30일)
vinothkannan K
vinothkannan K 2013년 12월 13일
편집: vinothkannan K 2013년 12월 16일
How to get Data type of stateflow input through script?
  댓글 수: 1
The Matlab Spot
The Matlab Spot 2013년 12월 13일
Do you want the data type to be compile time or defined in the data explorer?

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

채택된 답변

The Matlab Spot
The Matlab Spot 2013년 12월 13일
편집: The Matlab Spot 2013년 12월 13일
To get the data type defined in the Model Explorer:
tmp_SfPath = gcb;
get_param(tmp_SfPath,'Object')
tmp_SFObj = get_param(tmp_SfPath,'Object')
tmp_ChartObj = tmp_SFObj.find('-isa','Stateflow.Chart')
tmp_SFData = tmp_ChartObj.find('-isa','Stateflow.Data')
if(strcmp(tmp_SFData(1).Scope,'Input'))
tmp_SFData(1).DataType
end
  댓글 수: 2
The Matlab Spot
The Matlab Spot 2013년 12월 13일
Similarly you can check the SCOPE for other type of data also.
vinothkannan K
vinothkannan K 2013년 12월 16일
편집: vinothkannan K 2013년 12월 16일
Thanks Spot.,

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

추가 답변 (1개)

The Matlab Spot
The Matlab Spot 2013년 12월 13일
To get the data type of the input of the stateflow at compile time (for data set as inherit from Simulink)
1. Compile the model using
[sys,x0,str,ts] = model_name([],[],[],'compile');
2. Get the Statflow block input port's compiled port data type

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by