The links provided by ymihere look very useful. In addition, some of the options (nested functions and using GUIDATA ) discussed in these links are covered in another SO post: How do I create a GUI inside a function in MATLAB? There are several examples of how the code looks for each case.
, , , . , , , MATLAB ( ). , UserData ( ymihere). GUID GUIDE "myGUI.m", :
>> hGUI = myGUI('UserData','hello');
hGUI - GUI. UserData, , "hello":
>> get(hGUI,'UserData')
ans =
hello
"" , , . 'UserData' m GUIDE. handles, .
EDIT: UserData , , , ( ) . GUI , -, . , .