saved images in matlab

1 view (last 30 days)
muhammed
muhammed on 31 Aug 2012
when i want to save an image in matlab i just use ( im write ) command , but if i want to save a lot of images according to certain processing i can't use (imwrite) in a loop or something coz every time the new image will overwrite the last one ,, for ex; >> imwrite(A,'*name*.jpg'); at each time it's name will still "name" ... how can i fix this issue*bold*

Accepted Answer

Honglei Chen
Honglei Chen on 31 Aug 2012
You can dynamically change the file name. for example
for m = 1:10
% ...
fname = sprintf('name%d.jpg',m);
imwrite(A,fname);
% ...
end

More Answers (2)

Walter Roberson
Walter Roberson on 31 Aug 2012

muhammed
muhammed on 31 Aug 2012
thx guys u helped me a lot .. prob. solved :)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!