how to use setappdata() and getappdata()?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am getting the below error when I am using the following code:
function browse_push_Callback (hObject, eventdata, handles)
[f_name,f_path] = uigetfile({'*.jpg';'*.png';'*.gif';'*.tiff'},'Select the IMAGE');
image = imread(fullfile(f_path,f_name));
handles.image = image;
%disp(image);
handles.f_path = f_path;
handles.f_name = f_name;
%handles = handles.figure;
setappdata(handles,'im1',handles.image);
%setappdata(handles,'im1',image);
guidata(hObject,handles);
end
??? Error using ==> setappdata
Conversion to double from struct is not possible.
Error in ==> SAM_1>browse_push_Callback at 175
setappdata(handles,'im1',handles.image);
0 Kommentare
Antworten (1)
Image Analyst
am 9 Mär. 2014
See code examples in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
0 Kommentare
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!