how to load image to two axes with use of one push button
1 view (last 30 days)
Show older comments
Dear friends
I have to create color constancy program for using GUI in mat lab i want to load two images for using two axes(axes1,axes2) with the use of one pushbutton1(LoadImage) i have to try that following code
[File,Folder]=uigetfile('*.*','Multiselect','on');
handles.img=cell(1,length(File));
for iFile=1:length(File)
filename=strcat(Floder,File{iFile);
image=imread(filename);
axes(handles.axes(iFile));
imshow(image);
handles.img{iFile} =image;
end
guidata(hObject,handles);
Please any one help to me. How to execute that code ?
0 Comments
Accepted Answer
Walter Roberson
on 5 Feb 2013
In the line
filename=strcat(Floder,File{iFile);
you have spelled Folder incorrectly, and you missed a '}', and you left out the '/' or '\' between the folder name and the file name.
It is safer to use fullfile() instead of building the name yourself:
filename = fullfile(Folder, File{iFile});
2 Comments
More Answers (0)
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!