Pass data between GUIs without eval function

Hi all,
I've got a few GUIs working together, which should share information.
One of the GUIs has around 40 variables created, which must be used in other scripts/GUIs for data processing (Struct creation). I know is not good to use eval or global, however I don't really want to call a function with 40 inputs and 10-20 outputs 'cause I think it's ugly...
I know I could send and receive the variablels from the workspace by using Assignin(...), but is there any other easy/optimum way to do it??
Thank you!

5 件のコメント

Ameer Hamza
Ameer Hamza 2020 年 6 月 13 日
How are the GUIs created? Programatically, GUIDE, or App-designer? How about creating a handle class and passing its instance between GUIs. If one app changes a variable, all the other GUIs can automatically access new values.
Stephen23
Stephen23 2020 年 6 月 13 日
編集済み: Stephen23 2020 年 6 月 15 日
The standard, easy, and efficient approach is to store a structure in the UserData field of groot:
I recommend writing your own GUI code and avoiding GUIDE.
Jonathan Fernandez
Jonathan Fernandez 2020 年 6 月 15 日
Hi both, thank you for the answers.
I´ve created the GUIs using guide, which makes everything much easier. I've never tried programatrically tbh.
I'll have a look at both solutions and let you know if I have more problems, thank you!!
Jonathan
Rik
Rik 2020 年 6 月 15 日
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.
Jonathan Fernandez
Jonathan Fernandez 2020 年 6 月 15 日
Thank you Rik, that's very useful!!

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVariables についてさらに検索

タグ

質問済み:

2020 年 6 月 13 日

編集済み:

2020 年 6 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by