Sharing Data Between GUI...
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everybody! I've a problem : i needed to share data between 3 different GUIs that i've created using GUIDE. Now I've used the 'setappdata/getappdata' solution, specifing the MAtlab root in the function (something like setappdata(0,'new_var_name',var_name)). I need to have the data saved during a session available even after a restart of Matlab program. Is this possible? If yes, how? thanks a lot for any help :D
댓글 수: 0
답변 (2개)
Iain
2013년 5월 28일
You can, at select points in your code, save a bunch of parameters to a file with a name you have chosen, to record the "current" state of your GUI and other stuff.
When your GUI is initialising, or when the user presses a "load" command, you can load in that file, and do "stuff" to make the gui go into the correct state.
If you want the user to select the file to save, or load, the functions uigetfile and uiputfile will help.
댓글 수: 1
Iain
2013년 5월 28일
"save" and "load" will save and reload those parameters. If you want them to be unreadable, you'll need to use lower level functions to do the job.
Image Analyst
2013년 5월 28일
Did you see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
What I do is to save all those settings into a mat file that gets read in when your GUI starts.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!