Store MATLAB app designer variables to work-space
42 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
Sean de Wolski
2017-1-12
You could use assignin or export2wsdlg.
3 个评论
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
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 个)
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
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
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
2017-1-12
You can save variable in .mat file and then load it from workspace.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!