image storage with index type 0000
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I would like to store a series of images in .bmp format and with an index starting from 0000 for the first image, 0001 for the second and so on.. this is an example of the name of one of the images i want to save : 'ortophoto_0000.bmp' can you give me some advice? thank you
댓글 수: 0
답변 (1개)
KSSV
2022년 11월 30일
편집: KSSV
2022년 11월 30일
for i = 1:10
name = ['ortophoto_',sprintf('%.4d',i),'.bmp']
end
댓글 수: 1
Les Beckham
2022년 11월 30일
That works but, since you are using sprintf anyway, why not do this?
for i = 1:10
name = sprintf('orthophoto_%04d.bmp', i)
end
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!