モデル内に含まれるMatlab Function ブロックの一覧を検出する方法はありますか?
32 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2023 年 7 月 25 日
回答済み: 交感神経優位なあかべぇ
2023 年 7 月 26 日
モデル内に含まれるMatlab Function ブロックの一覧を検出する方法を教えてください。
採用された回答
MathWorks Support Team
2023 年 7 月 25 日
編集済み: MathWorks Support Team
2023 年 7 月 25 日
Stateflow.EMChart オブジェクトを使用して、検出できます。
%モデルを開く
%以下でMATLAB Function ブロックパスを検出
bd = get_param(gcs,'Object');
blks = find(bd,'-isa','Stateflow.EMChart');
for n=1:length(blks)
blks(n).Path
end
%
関連ドキュメントページ
プログラムによる MATLAB Function ブロックの設定
https://jp.mathworks.com/help/simulink/ug/configure-matlab-function-blocks-programmatically.html
0 件のコメント
その他の回答 (1 件)
交感神経優位なあかべぇ
2023 年 7 月 26 日
SubSystemのブロックパラメーターSFBlockTypeをfind_systemで検索することで、MATLAB Functionを検出できます。
find_system(bdroot, 'SFBlockType', 'MATLAB Function')
同様の方法で、下記Stateflowブロックも特定することができます。ブロック名とSFBlockTypeの値を記述します。
ブロック名 : SFBlockType
- Chart : Chart
- Truth Table : Truth Table
- State Transition Table : State Transition Table
- MATLAB Function : MATLAB Function
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Function についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!