I tried the following program for reading multiple images(about 300 images). Now I want to store these images immediately after reading each to some location by some name as
Try this -
for i=1:5
img =imread(['C:\Users\shree\Desktop\1\im' num2str(i) '.jpg']);
evalc(['g' num2str(i) '=img;']);
end
figure,imshow(g1);
figure,imshow(g2);
Another approach could be to use STRUCT and store those images as fields of a struct.
Storing as a 4D matrix is another efficient way as suggested by herohuyongtao.