Store MATLAB app designer variables to work-space

253 views (last 30 days)
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.

Accepted Answer

Sean de Wolski
Sean de Wolski on 12 Jan 2017
You could use assignin or export2wsdlg.
Manoj Devaraju
Manoj Devaraju on 16 Aug 2021
For variable Its easy but what If I need to output data from the GUI to the struct,which already present in the workspace?

Sign in to comment.

More Answers (3)

qmnjb007 on 12 Jan 2018
Edited: qmnjb007 on 12 Jan 2018
Here's a link to the matlab page on sharing data within apps that has sample solutions.

Chris Portal
Chris Portal on 10 Apr 2016
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?
Alok Virkar
Alok Virkar on 8 Mar 2018
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.

Sign in to comment.

Armen Ghambaryan
Armen Ghambaryan on 12 Jan 2017
You can save variable in .mat file and then load it from workspace.


Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!