MATLAB Answers

Variant Subsystems control by Model Workspace variables?

21 ビュー (過去 30 日間)
Tilman
Tilman 2014 年 8 月 31 日
編集済み: Jonas 2020 年 6 月 25 日
Dear Community,
does there exist a way to use Model Workspace variables instead of Base Workspace variables for variant control?
I would like to avoid using callbacks for variant override.
I wonder why hierarchical symbol resolution ( http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/ ) does not apply for variant control ...
Best regards,
Tilman

  2 件のコメント

Christopher Slack
Christopher Slack 2017 年 3 月 15 日
I would like to bump this question as I have just come across the same problem. In R2016b when trying to use Simulink.Variant in the model workspace variable the error is "...must be a condition expression or name of a Simulink.Variant object in the global scope workspace of the model."
Unfortunately, this just ends up with more bloat in the base workspace.
Francis Gagnon
Francis Gagnon 2018 年 1 月 26 日
I have exactly the same problem in R2017b. I would like to hide the Simulink.Variant variables from the global workspace...

サインインしてコメントする。

回答 (2 件)

Mobashar Ahmad
Mobashar Ahmad 2019 年 10 月 28 日
Any updates on this? i would also like to use the Model Workspace to manage the variants control variables.

  1 件のコメント

Markus
Markus 2020 年 6 月 24 日
Same here. These make more sense in the model workspace anyway.
Any update from a staff member?

サインインしてコメントする。


Jonas
Jonas 2020 年 6 月 25 日
編集済み: Jonas 2020 年 6 月 25 日
You can create a Simulink.Variant variable and put it inside a Data Dictionary, and then link this Data Dictionary to the model.

  0 件のコメント

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by