I'm working in matlab and I need integers produced by a certain loop to have leading 0s so that the number is from 000 to 365. I'm then going to use num2str to get it into a string and concatenate it to a bunch of other text that will create a filename according to a formula. I'm having trouble getting the leading 0s to stay in the number for example if I were to type
> 001
ans = 1
would be the response. Any help would be greatly appreciated. Thank you.