MATLAB: GUI axes handle

axesguiloop

hi all, i want to ask how we set axes handle in a loop
e.g:
i want to show images in two axes according to their order, in axes 1 i wan to show image1 and soon..
f = 'F:/Maya/pengenalan pola/tugas image retrieve/image';
fileList = dir(fullfile(f,'*.jpg'));
for m = 1:2
name{m} = fileList(m).name;
axes(handles.axes(num2str(m+1)));
imshow(imread(name(m)))
end
Of course, that returns error.. Help me plzz…
Maya

Best Answer

The handle of the axes (or the tag of the axes) in your GUI made from GUIDE is unlikely to be handles.axes(2) or handles.axes(3).
Maybe you should try.
axes(handles.(['axes',num2str(m+1)]))
set a break point in your code, run your code line by line, check the value of those variables to find out.
Related Question