scrip

2009-10-12 Thread Jesus Fernandez
Here is the script: jaff #!jesusafernandez/bin/perl use warnings; for ($samp=0; $samp<5000; $samp++) { $n = 1; $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; $ti

script

2009-10-12 Thread Jesus Fernandez
Dear friends, My script is working, I want 5000 simulations, however my script gave me 5000 numbers (which is good): but their all the same, any idea what should I change? jaff

question

2009-10-12 Thread Jesus Fernandez
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 = 1; $k = 25; while ($k>=2){ if ($k==1) {last;

Re: adding populations

2009-10-08 Thread Jesus Fernandez
Dear friends, I'm trying to write a program that draws 5,000 numbers from an exponential distribution with mean 4N/k(k-1) N=10 000 k = 25 I have this: #!jesusafernandez/bin/perl $k = 25; $N = 1; for ($samp=0; $samp<5000; $samp++) { while ($k!= "$25") { $mean = 4$N/$k($k

adding populations

2009-10-06 Thread Jesus Fernandez
Dear friends, I'm working in a genetic drift simulation and I want to add a second population to my script, any suggestions how to do that? j