0

I have a 1x7049 Cell Array. Each of the elements of this array is a 96x96 matrix.

Now, I want to save each of these 96x96 matrices into jpg files, so that I will get 7049 images. How can I do this?

Sharath Chandra
  • 89
  • 1
  • 1
  • 9
  • 3
    You can do this by iterating the cell array with a loop and save each image into a separate file. – Eitan T Oct 10 '13 at 05:28

1 Answers1

1

Use a loop

for ii = 1:numel(myCellArr)
    fileName = sprintf('image_%04d.jpg');
    imwrite( myCellArr{ii}, fileName );
end
Shai
  • 111,146
  • 38
  • 238
  • 371