INTRODUCTION: Hi, I make a string concatenation using alpha and numerical characters
['K=' num2str(k)]
Thus, using the loop below
for k=998:1001['K=' num2str(k)]end;
I obtain the following strings K=998, K=999, K=1000, K=1001
which I use elsewhere.
PROBLEM/WISH: I would like TO ADD ONE ZERO BEFORE the number as below:
K=0998, K=0999, K=1000, K=1001
and I would like TO ADD TWO ZEROS if k<100, and THREE ZEROS if k<10
I wonder if someone could help to fix this problem.
Thank you Emerson
Best Answer