How to get Data type of stateflow input through script?
2 ビュー (過去 30 日間)
古いコメントを表示
How to get Data type of stateflow input through script?
1 件のコメント
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
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 件のコメント
その他の回答 (1 件)
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!