develooper Front page | perl.beginners | Postings from October 2009

scrip

Thread Next
From:
Jesus Fernandez
Date:
October 12, 2009 18:28
Subject:
scrip
Message ID:
952a527f0910121828p792860acmde3c6ed816781e1e@mail.gmail.com
Here is the script:

jaff

#!jesusafernandez/bin/perl
use warnings;

for ($samp=0; $samp<5000; $samp++)
{
$n = 10000;
$k = 25;
while ($k>=2){
    if ($k==1) {last;}
    $mean=(4*$n)/$k*($k-1);
    $time=(-log(rand)*$mean);
    push(@coalt, $time);
    $k=$k-1;
    }
    for ($time=0; $time<=24; $time++){
    }
    print "$coalt[$time]\n";
    }

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About