モデル内に含まれるMatlab Function ブロックの一覧を検出する方法はありますか?
6 次查看(过去 30 天)
显示 更早的评论
モデル内に含まれる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!