How to share variables across GUIs?
7 views (last 30 days)
Arthur on 21 Nov 2012
I prefer to store and share data with the function setappdata and getappdata. This is, in my opinion, more clear and better structured.
Watch this video on how it works: http://www.mathworks.com/matlabcentral/fileexchange/8616
More Answers (1)
Walter Roberson on 21 Nov 2012
If you used GUIDE, you need to use guidata() on the figure number for GUI2 in order to get GUI2's handle structure in GUI1. Then you can change things in the normal way. For example,
handles2 = guidata(GUI2_figure);
set(handles2.Num1, 'Value', get(handles.Num1, 'Value'))