MATLAB Answers

How to use data from base workspace in app designer application

227 ビュー (過去 30 日間)
Daan Decleer
Daan Decleer 2017 年 5 月 1 日
コメント済み: Adam Danz 2020 年 2 月 8 日
In my app designer program I have several Numeric Edit Fields, I would like to set them to the already declared variables before in the base workspace when my application opens.
Is there a way I can load the existing Variable and put them in the already existing EditField?
Thanks already, I look out to your answers.

  0 件のコメント

サインイン to comment.


xi 2017 年 5 月 1 日
initialize your EditFields using evalin(), such as: app.EditField1.Value=evalin('base','myvar1'); app.EditField2.Value=evalin('base','myvar2'); ...

  3 件のコメント

Daan Decleer
Daan Decleer 2017 年 5 月 2 日
Thanks for your answer Xi!
Can you solve the DropDowns in the same way? If I initialize the DropDown with a String (which is one of it's possibilitys) will it work?
Best Regards
xi 2017 年 5 月 2 日
For example, if you have mystring={'A','B','C'}; in the workspace,
you can set the DropDown.Items in the startup function of app.
Adam Danz
Adam Danz 2020 年 2 月 8 日
Check out this demo that shows how to produce a UITable that lists all variables in the workspace, their size, and class, and allows the user to use a checkbox to select which variables should be loaded into the app.
200208 171846-.png

サインイン to comment.

その他の回答 (0 件)

サインイン してこの質問に回答します。


Translated by