Dear all,
 
I am sort of new to matlab and spm and I have a question that I am sure is simple for most of you. I have a string which is named "2.40-resting-s005" and I want to rename it in way that I can compare it with another string using strcmp. However, I need the rename file to be started with letter A following by 4 digits following by dot and finally following with 2 digits like "A0002.40". For doing this I used the following command:
 
sprintf('A%04d.%d', test)
 
in which test='2.40-resting-s005'
 
, but I don't get the output in the format that I want('A0002.40'). Could you please help me to sort out this problem.
 
Best
Kami