image storage with index type 0000
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
KSSV
el 30 de Nov. de 2022
Editada: KSSV
el 30 de Nov. de 2022
for i = 1:10
name = ['ortophoto_',sprintf('%.4d',i),'.bmp']
end
1 comentario
Les Beckham
el 30 de Nov. de 2022
That works but, since you are using sprintf anyway, why not do this?
for i = 1:10
name = sprintf('orthophoto_%04d.bmp', i)
end
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!