MATLAB Answers


How to use data from base workspace in app designer application

Daan Decleer さんによって質問されました 2017 年 5 月 1 日
最新アクティビティ xi
さんによって コメントされました 2017 年 5 月 2 日
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.


1 件の回答

Answer by xi
on 1 May 2017
 Accepted Answer

initialize your EditFields using evalin(), such as: app.EditField1.Value=evalin('base','myvar1'); app.EditField2.Value=evalin('base','myvar2'); ...

  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
For example, if you have mystring={'A','B','C'}; in the workspace,
you can set the DropDown.Items in the startup function of app.

サインイン to comment.

Translated by