フィルターのクリア

set configuration of State flow using M script

4 ビュー (過去 30 日間)
Abdou Beda
Abdou Beda 2016 年 7 月 19 日
回答済み: Muthukumar Ganesan 2022 年 8 月 14 日
Hello all, I want to set the configuration of State flow ,Strong data type with Simulink, by using .M script in Matlab 2015b. Till now I was able to found all the State flows in the model, but I do not know how to set this Parameter? Any idea?
Sub_sys = find_system(gcs,'FollowLinks','on','FindAll','on','LookUnderMasks','all','SearchDepth',10,'blocktype','SubSystem');
for i =1:length(Sub_sys)
if(strcmp(get_param(Sub_sys(i),'SFBlockType'), 'Chart')== 1)
name = get_param(Sub_sys(i), 'name');
setPropEnabled(name(1).StrongDataTypingWithSimulink', true); %%this line is Wrong does not work
end
end

回答 (1 件)

Muthukumar Ganesan
Muthukumar Ganesan 2022 年 8 月 14 日
Hi,
Please use the following commands to modify it and also make sure the model is not in simulation mode.
Hope this helps. Thanks.
rt=sfroot;
ChartProp=rt.find('-isa','Stateflow.Chart');
ChartProp(1).StrongDataTypingWithSimulink=1;

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by