From: Matt Fig on
You might have a look at the STRREP function.
From: Walter Roberson on
Aino wrote:

> 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)?

If you have a single decimal point, multiply by 10 before taking num2str().

In general if you have a string S that contains a '.' that you want to remove,

S(S=='.') = [];
From: Aino on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i3i1rc$ol4$2(a)canopus.cc.umanitoba.ca>...
> Aino wrote:
>
> > 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)?
>
> If you have a single decimal point, multiply by 10 before taking num2str().
>
> In general if you have a string S that contains a '.' that you want to remove,
>
> S(S=='.') = [];

Thank you all, short and neat. :)

-Aino