Borrar filtros
Borrar filtros

naming file with count

6 visualizaciones (últimos 30 días)
Guan-Lin Chen
Guan-Lin Chen el 2 de Oct. de 2020
Editada: Adam Danz el 6 de Oct. de 2020
FileName = fullfile('C:\Users\User\Desktop\1cm circle cropped 0.27',sprintf('circle_cropped_%d.jpg',count));
The code I use would give file name (circle_cropped_1.jpg, circle_cropped_2.jpg, circle_cropped_3.jpg.........)
How to name the images with "circle_cropped_001.jpg, circle_cropped_002.jpg, circle_cropped_003.jpg.........................."
And how to move the counting number? to be "001_circle_cropped.jpg, 002_circle_cropped.jpg, 003_circle_cropped.jpg......................."

Respuestas (1)

Adam Danz
Adam Danz el 2 de Oct. de 2020
Editada: Adam Danz el 6 de Oct. de 2020
sprintf('circle_cropped_%03d.jpg',count)
% ^^

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by