How to load the image into one or more axes at the same time?
Mostrar comentarios más antiguos
I have to use following code for load the two different images for different axes. But i got the Error message How to rectify that error?
??? Cell contents reference from a non-cell array object.
Error in ==> colrc>imagebtn_Callback at 84
filename=fullfile(Folder,File{iFile});
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> colrc at 42 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)colrc('imagebtn_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
Code:
function imagebtn_Callback(hObject, eventdata, handles)
% hObject handle to imagebtn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[File,Folder]=uigetfile('*.*','Multiselect','on');
handles.img=cell(1,length(File));
for iFile=1:length(File)
filename=fullfile(Folder,File{iFile});
image=imread(filename);
axes(handles.axes{iFile});
imshow(image);
handles.img{iFile}=image;
end
guidata(hObject,handles);
Please any one help this problem.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!