Store MATLAB app designer variables to work-space

72 ビュー (過去 30 日間)
Jack
Jack 2016 年 3 月 20 日
コメント済み: Manoj Devaraju 2021 年 8 月 16 日
Hi. How we can store app designer variables to MATLAB R2016a main window work-space. We have this behavior in GUIDE. There I can't find any connection between app designer and work-space of MATLAB.
  1 件のコメント
Farzam Malmir
Farzam Malmir 2018 年 4 月 9 日
Did you finally find a right answer?

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

採用された回答

Sean de Wolski
Sean de Wolski 2017 年 1 月 12 日
You could use assignin or export2wsdlg.
  3 件のコメント
Eric Sargent
Eric Sargent 2020 年 12 月 9 日
Example of assigning output to base workspace after pressing a button:
function ButtonPushed(app,event)
x = 10;
assignin('base','x',x);
end
Manoj Devaraju
Manoj Devaraju 2021 年 8 月 16 日
Hello,
For variable Its easy but what If I need to output data from the GUI to the struct,which already present in the workspace?

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

その他の回答 (3 件)

qmnjb007
qmnjb007 2018 年 1 月 12 日
編集済み: qmnjb007 2018 年 1 月 12 日
Here's a link to the matlab page on sharing data within apps that has sample solutions.

Chris Portal
Chris Portal 2016 年 4 月 10 日
Jack, I can imagine a few scenarios why I might need to do this, but I'm curious to hear yours. Can you share why you're looking to store your App Designer variables outside your app? Is it to troubleshoot something or for some other purpose?
  2 件のコメント
Stephen Wilkerson
Stephen Wilkerson 2018 年 1 月 5 日
Typical... I can imagine a 1000 different reasons to do this. Why exactly is the workspace outside of the App designer?
Alok Virkar
Alok Virkar 2018 年 3 月 8 日
I am looking for an answer for the original post. I need this so I can design a GUI for a 6DOF aircraft simulation in simulink. I want the user to define his inputs into the gui, and once a button is pushed I want the related m file aswell as the simulation to run using the variables defined by the user.

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


Armen Ghambaryan
Armen Ghambaryan 2017 年 1 月 12 日
You can save variable in .mat file and then load it from workspace.

カテゴリ

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