From: Aino on 6 Aug 2010 17:56 Hi all, a quick question. I would like to remove the dot in the decimal number in order to include it to a file name. So if d=0.1;, num2str(d) will convert it to string, but is there something simple to get d to '01' (such as nonzero is for zeros)? Thank you, Aino
From: ImageAnalyst on 6 Aug 2010 18:02 num=0.1 % Don't add the dot extension yet or it will get deleted. filename = ['File For The Value ' num2str(num)] filename(filename=='.') = [] % Now we can add in the extension. filename = [filename '.txt']
|
Pages: 1 Prev: Converting GAUSS to Matlab Next: Removing a dot from decimal numbers |