MATLAB: How to show all jpg images saved in MATLAB folder

faqImage Processing Toolboxjpeg images

storedStructure = dir('*.jpg')
How should I proceed?

Best Answer

This displays all of the jpg images in the current directory:
S = dir('*.jpg');
for k = 1:numel(S)
figure();
image(imread(S(k).name))
axis('image');
end
Note: this code will not work with indexed image formats.