filename=strcat('frame',num2str(i),'.jpg')
This line is within a for loop so images are created with filenames...
frame1, frame2...frame50
How can I change this line of code so that it is... frame001, frame002 ... frame050

 Respuesta aceptada

Jan
Jan el 20 de Ag. de 2011

0 votos

filename = sprintf('frame%03d.jpg', i)

Más respuestas (2)

Micky Elias
Micky Elias el 19 de Mayo de 2020

0 votos

filename=strcat(num2str(img,'%04i'),'.jpg');

1 comentario

Walter Roberson
Walter Roberson el 19 de Mayo de 2020
%03i not %04i for the user question.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 19 de Ag. de 2011

Comentada:

el 19 de Mayo de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by