Wouldn't that work with just changing the variable to 5 000 instead of 10 000 
like you have it setup
Example:

N=5 000 instead of N=10 000
 Jason H. Owens 




________________________________
From: Jesus Fernandez <jfer...@tigers.lsu.edu>
To: beginners@perl.org
Sent: Mon, October 12, 2009 4:40:51 PM
Subject: question

Hello friends,

I wrote a program that can simulate coalescent times of gene copies in a
single population of constant size with a N=10 000 and a k=25, now i want to
make 5000 simulations, any help?

#!jesusafernandez/bin/perl
use warnings;

$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";
    }



      

Reply via email to