MATLAB: Save more than one image in a matfile

matfile

i select an image from a folder and save it in a matfile..... then i load the matfile and display the image.....
[filename pathname]=uigetfile('*.tif','Select An Image');
inputImage=imread([pathname filename]);
save imageMatfile inputImage
how to save more than one image in the same matfile(not all images in folder, but only those i want)…….using these select statements is it possible???…… please do reply….

Best Answer

for K = 1 : 10
[filename pathname] = uigetfile('*.tif','Select An Image');
inputImages{K} = imread(fullfile(pathname, filename));
end
save imageMatfile inputImages