in reply to GSL lognormal random

This is untested due to a borked installation, but I would try it in a form something like this:
#!/usr/bin/perl use strict; use warnings; use Math::GSL::Randist qw/:all/; use Math::GSL::RNG; my $rng = Math::GSL::RNG->new; my $num = $rng->raw(1); my $x = Math::GSL::gsl_ran_lognormal::new( $num, 0.1, 0.2); print "$x\n";

Replies are listed 'Best First'.
Re^2: GSL lognormal random
by James_H (Acolyte) on Mar 09, 2011 at 19:12 UTC

    Thank you to both. Here is codes that works...

    Regards, James

    use Math::GSL::Randist qw/:all/; use Math::GSL::RNG; my $rng = Math::GSL::RNG->new; my $random_numbers = $rng->raw(); my $x = gsl_ran_lognormal($random_numbers, 0.1, 0.2); print "$x\n";