MATLAB: Reading an image

reading image

I have a code
X=zeros(256,256,15)
for x = 1:length(dirlist)
i = imread([pathname, dirlist(x).name]);
A=i;
X(:,:,x)=A;
save X
end
load X
i have saved 15 images in X,i have used load command,now please tell how to read those images

Best Answer

one way
for ii = 1:size(X,3)
imshow(X(:,:,ii));
end