www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ReadSpecifiedImageExample.m

    %% Read Specified Image
% Create an |ImageDatastore| object containing two images, and then read and view the second 
% image.

imds = imageDatastore({'street1.jpg','street2.jpg'});
img = readimage(imds,2);
imshow(img)