How to use one pushbutton to open different images
Show older comments
Hi, I have a list box and one pushbutton and I want to use this push button to plot images ( it depends on what i choose from listbox). I have absolutely no idea...
Thanks Jane
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 10 Mar 2013
In your pushbutton callback add this code
s=get(handles.listbox1,'string')
idx=get(handles.listbox1,'value')
im=imread(s{idx})
imshow(im)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!