Hi Nick -

I think you'll need to use grandom, and then spread/shift it.  Try this:

$stdev = 2;
$mean = 5;
$randMatr = grand(5,5) * $stdev + $mean;

David

On Tue, Jul 7, 2009 at 11:21 AM, Nicholas Wright <
[email protected]> wrote:

>
> Hi
>
> This may be a simple question, but I'm a PDL newbie, so any help
> appreciated.
>
> How do I generate a random number from a Gaussian distribution with
> standard deviation $a and center $b ?
>
> Thanks,
> Nick
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to