From: Aino on
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
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']