Store MATLAB app designer variables to work-space

41 visualizaciones (últimos 30 días)
Jack
Jack el 20 de Mzo. de 2016
Comentada: Manoj Devaraju el 16 de Ag. de 2021
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.

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 12 de En. de 2017
You could use assignin or export2wsdlg.
  3 comentarios
Eric Sargent
Eric Sargent el 9 de Dic. de 2020
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 el 16 de Ag. de 2021
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?

Iniciar sesión para comentar.

Más respuestas (3)

qmnjb007
qmnjb007 el 12 de En. de 2018
Editada: qmnjb007 el 12 de En. de 2018
Here's a link to the matlab page on sharing data within apps that has sample solutions.

Chris Portal
Chris Portal el 10 de Abr. de 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?
  2 comentarios
Stephen Wilkerson
Stephen Wilkerson el 5 de En. de 2018
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 el 8 de Mzo. de 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.

Iniciar sesión para comentar.


Armen Ghambaryan
Armen Ghambaryan el 12 de En. de 2017
You can save variable in .mat file and then load it from workspace.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by