MATLAB: How to select image from a particular folder

select image from folder

i wanted to select an image from a folder named dataset….
[filename pathname]=uigetfile('*.tif','Select An Image');
when i do so, i have to select the Dataset folder and then the image from it…. what shud i do so that on execution itself the images will be displayed so that i neednt select on Dataset folder and then images

Best Answer

Read the documentation.
FilterSpec can include a path. That path can contain '.','..', \, '/', or '~'. For example, '../*.m' lists all code files in the folder above the current folder.