I have many bin data files that are generated (with other hardware/software where I can not control the naming but know the name) with different numbers identifying them. When I try to use num2str to generate the name for reading in the file it removes the trailing zeros and even the decimal point. For example, for the number 52.00 it outputs "52" , where I need "52.00" for use in the file name. Is there some over-ride for it to give exactly what the input is? I am sure that I can write a program to catch all the special cases and use the concat function to make the corrections, but I would rather not. Is there a simple solution?