フィルターのクリア

Mask-like editor for all parameters in the Simulink model

1 回表示 (過去 30 日間)
Radoslaw
Radoslaw 2024 年 6 月 11 日
回答済み: Fangjun Jiang 2024 年 6 月 11 日
Is there a way to conveniently have a dialog to edit all the parameters in the model in a single place?
I have a model consisting of several MATLAB functions connected with other Simulink blocks. Each of the MATLAB function have several inputs set as parameters - some of these are unique to chosen function block, while others are shared between multiple blocks. I am looking to edit all of these parameters from a single place within the Simulink.
I've tried some workarounds but none of them seem to work sufficiently well. I know that I can initialize the variables in the Init Callback or directly in the Matlab workspace, but switching between Simulink and Matlab windows or entering Callbacks menu just to tune some parameters isn't very convienient. I have also tried to connect functions to Write Parameters blocks and to initialize all parameters in the single section of the model, but Write Parameters doesn't seem to work with MATLAB functions (even when masked). I've also tried to use Dashboard Edit block to change values of the paramters, but it still required me to first initialize them in the main Matlab workspace. Another workaround (probably the closest to what I want to achieve) is to enclose the entire model in a single mask, but the configuration of this mask is another inconvenience and I would have to open this mask everytime to make any changes in the structure of the model.

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2024 年 6 月 11 日
At your Simulink model, press Ctrl+H to open the Model Explorer. Click Base Workspace, there you can see all variables and edit them.

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by