MATLAB: Handles that were created in the Callback, can be used in the other Callbacks matlab gui I want to create a handles in the Callback and use data that was stored in in the handles in other Callback. Is it possible? thanks, Best Answer Several ways are shared in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F Related SolutionsMATLAB: Pass variables into set(frt,’WindowButtonDownFcn’,@mousePos) set(frt, 'WindowButtonDownFcn', {@mousePos, data} )andfunction mousePos(hObject, ~, data)Note: this will use the value of "data" as of the time the callback is created, and will not reflect any updates to "data" that are made after that. MATLAB: How to pass image from one push button to another Save it to the guidata struct. Related QuestionHow to extract information from a ‘WindowButtonUpFcn’How to get uicontrol value inside a callback function
Best Answer