saved images in matlab

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*

 채택된 답변

Honglei Chen
Honglei Chen 2012년 8월 31일

1 개 추천

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

추가 답변 (2개)

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by