MATLAB: How to create a single .mat file from multiple images

.mat file

Hi all,
Assume that I have 5 images as following: 1.bmp, 2.bmp, 3.bmp, 4.bmp, 5.bmp. I want to combine those 5 images into a single .mat file. Anyone knows how to solve this issue, please help me!!
Thanks in advance!!

Best Answer

for k=1:5
h{k}=imread(sprintf('%d.bmp',k));
end
save file h
Related Question