MATLAB Answers

James
0

strcat help

Asked by James
on 19 Aug 2011

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

  0 Comments

Tags

Products

No products are associated with this question.

2 Answers

Answer by Jan Simon
on 20 Aug 2011

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

  0 Comments


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!