- Follow the steps below to create a mask variable marked as a model argument: Create and Reference a Masked Model
- Then, convert the model reference to protected.
- Right click and select “Block Parameters” and add “.slxp” to the “Model name” field.
- Set the mask, save the model and simulate it.
How to select a structure as a tunable parameter for a protected model?
7 ビュー (過去 30 日間)
古いコメントを表示
I create a structure in base workspace then use it to configure my simulink subsystem through mask, everything goes well. But once I protect the subsystem, the subsystem configuration remains unchanged even if the structure in base workspace is changed, and I cannot select the structure as the tunable parameter for the generated protected model, how can I solve this problem?
0 件のコメント
回答 (1 件)
Alan
2025 年 8 月 5 日
Hello Haotian,
I assume you are providing a structure as a tunable parameter using the “Simulink.Bus” class. I am also not able to find tunable parameters while creating a protected model.
The following workflow is an alternate workflow I tried with Simulink R2025a and R2025a Update 1.
However, I was not able to edit the block parameters through the mask, even for variables of other data types, not just structures.
This could be a bug. The next step could be to reach out to MathWorks Technical support: Contact Support - MATLAB & Simulink
Regards,
Alan
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!