ブロックマスクへの変数表示の方法
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
作成したSimulinkブロックのマスクにモデルワークスペースで設定した変数を表示させたいのですが、
どうすればいいでしょうか。
宜しくお願いします。
0 commentaires
Réponse acceptée
Atsushi Ueno
le 27 Avr 2022
>作成したSimulinkブロックのマスクにモデルワークスペースで設定した変数を表示させたいのですが、どうすればいいでしょうか。
サブシステムを右クリック⇒マスク⇒マスクの編集(Ctrl+M)⇒「アイコンと端子」タブの「アイコンを描画するコマンド」に下記のコードを記述してください。
MWS = get_param(bdroot,'ModelWorkspace'); % モデルワークスペースの取得
disp(evalin(MWS, 'VarName')); % 変数'VarName'の値をSimulinkブロックのマスクに表示
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Author Block Masks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!