![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1200473/image.png)
マスク内のto WorkSpaceの変数名を可変にする方法
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1200413/image.png)
上の図のようにマスク内部にVoltageSensorとTo WorksSpaceを合体させたブロックを作成した際に
変数名Valをマスクパラメータとして可変にしたいのですが良い方法はないでしょうか?
Val = "Val1"; としてstring形式で代入しても、値がValに代入されてしまいます。
0 commentaires
Réponse acceptée
交感神経優位なあかべぇ
le 20 Nov 2022
マスク設定のパラメーターで、プロモートを使用したらどうでしょうか?
プロモートを使用すれば、対象のTo Workspaceの変数名の設定を直接マスクパラメーターとして指定できます。
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1200473/image.png)
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!