How to implement a matlab GUI interface?

1 view (last 30 days)
Ampi
Ampi on 12 Mar 2013
Hello,
I have a question. Say I have 5 images and I have designed a GUI interface to view all those images. I want to implement a slider that would help me to browse the images one by one. I have written the following code but it is not executing:-
for i=1:2
filename= strcat(int2str(i),'.bmp');
filename=fullfile(directoryname,filename);
I=imread(filename);
% Create a scroll panel for left image
hSpL = imscrollpanel(I);
set(hSpL,'Units','normalized',...
'Position',[0 0.1 .5 0.9])
% Create scroll panel for right image
hSpR = imscrollpanel(I);
set(hSpR,'Units','normalized',...
'Position',[0.5 0.1 .5 0.9])
% Add a Magnification box
hMagBox = immagbox(I);
pos = get(hMagBox,'Position');
set(hMagBox,'Position',[0 0 pos(3) pos(4)])
%%Add an Overview tool
imoverview(hImL)
end
Please help

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!