フィルターのクリア

How to assign data from App Developer to workspace in Matlab?

112 ビュー (過去 30 日間)
Paul Hinze
Paul Hinze 2023 年 3 月 10 日
回答済み: Cameron 2023 年 3 月 10 日
Dear community,
i am trying to learn the app developer to build a GUI. Until know this works fine, but i do not know how to transfer variables from the GUI to my workspace in Matlab. I tried to use the command assignin, but i did not succeed.
Best,
Paul

採用された回答

Cameron
Cameron 2023 年 3 月 10 日
The way assignin() works to send variables from App Designer to your workspace is that the first arguement is 'base', second is what you want your variable name in your MATLAB workspace to be, and the third is the name of your variable in App Designer. In this case, I called the variable in your workspace 'MyVar' and the data from App Designer as 'app.UIAxes'. Just put whatever your variable is in the place of 'app.UIAxes', and it should show up in your workspace as 'MyVar'.
assignin('base','MyVar',app.UIAxes)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by