Masking a system with variability

1 回表示 (過去 30 日間)
Kristof Berx
Kristof Berx 2017 年 8 月 2 日
回答済み: Brian Hannan 2017 年 8 月 7 日
I have a model M1 containing several variable subsystems. The variant controls for these variant subsystems depend on a set of parameters a, b and c. These parameters a, b and c were added to the model workspace and set as arguments I have created a model mask for this model, containing all parameters on which the variant control depends. I now want to use M1 as a model reference in a model M2 and select the variant to use through mask parameters.
However, when doing this, I cannot simulate the model. The diagnostic viewer shows an "undefined function or variable" error.
Adding parameters a, b and c to the base workspace seems to fix this, but that is not ideal since I may have multiple instances of the referenced model M1, each with a different variant selected.
What is the best way of dealing with this?

回答 (1 件)

Brian Hannan
Brian Hannan 2017 年 8 月 7 日
I would make a, b and c parameters of my mask. More on this here. You could also specify these variables in the mask initialization commands.

カテゴリ

Help Center および File ExchangeComponent-Based Modeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by