Create new workspace

16 ビュー (過去 30 日間)
Adrian Dronca
Adrian Dronca 2012 年 1 月 11 日
コメント済み: Jared Van Cor 2021 年 6 月 22 日
Hello all,
I have a mask(loads a GUI) with many variables that also exist in base. I want to be able to use the mask block more than 1 in my Simulink models.
I want to create a new workspace everytime i place the block in the model and i configure it.
If you have any ideas how i can solve this, please share.
Thanks in advance !

回答 (2 件)

Daniel Shub
Daniel Shub 2012 年 1 月 11 日
This is what functions do. Pass what you need to a function, and then it is a protected workspace.

Adrian Dronca
Adrian Dronca 2012 年 1 月 11 日
Yes but when you close the GUI, the function ends and all the data will be lost. I need to held all data from all the blocks in the model, for example i put 3 times the block i want each one to have its own data.
I need a way to transmit the data from the GUI to the Mask if I have 2-3 blocks at the same time.
  1 件のコメント
Jared Van Cor
Jared Van Cor 2021 年 6 月 22 日
This is probably too little too late, but look at assignin
assignin("base","variable",app.variable)
This will take the variable in your app and pass if to your primary default workspace. You can also pass to other workspace.

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

カテゴリ

Help Center および File ExchangeAuthor Block Masks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by