MATLAB: Create a vector/matrix with .jpgs

vector matrix images

Hi!
I would like to create a vector or a matrix with .jpgs, that is, that there is a .jpg in each cell.
Later I would need to make matlab to present those jpgs randomly.
Can any of you help me?
Thanks! María

Best Answer

Just assign the cells
ca{1} = image1;
ca{2} = image2;
etc.
Then use randperm
numberOfCells = size(ca);
randomOrder = randperm(numberOfCells);
for k = 1 : numberOfCells
indexToDisplay = randomOrder(k);
imshow(ca{indexToDisplay});
end