is there a simple way to fetch a picture into a variable by clicking?

I just wonder if there is a way to read an image into a variable without writing its name like x = imread('myimage1');
I need to pick a picture (from a group) then processes it. I am done processing the picture but I am stuck at this for the last 4 hours.
I only need a button which allows me to pick an image and load it into a variable.
thanks a lot

 Accepted Answer

See uigetfile() if you are wanting to get the names from a directory. If you already know the names, then you can use a uicontrol() of style listbox or popup

Categories

Community Treasure Hunt

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

Start Hunting!