Date: Jan 29, 2013 12:32 PM Author: Bruno Luong Subject: Re: Generate randomly between -1 and 1 dpb <none@non.net> wrote in message <ke8q86$59q$1@speranza.aioe.org>...
>
> z=y + sign(rand(size(x))-0.5).*x;
Beaware there is a small chance that rand() returns exactly 0.5, which might create buggy code.
Bruno