Re: scrip

2009-10-12 Thread Uri Guttman
> "JF" == Jesus Fernandez writes: JF> Here is the script: it helps if your question and code are in the same posting. this will be a general code review as well as a solution to this last bug. JF> jaff JF> #!jesusafernandez/bin/perl JF> use warnings; use strict ; always use both s

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

Re: question

2009-10-12 Thread Shlomi Fish
Hi Jesus! I'm BCCing this message to a fellow Perl programmer who also studies in lsu.edu , and whom I've met on the IRC. He would be free to respond to the list and/or to you and me in private. On Monday 12 Oct 2009 23:40:51 Jesus Fernandez wrote: > Hello friends, > > I wrote a program that c

Re: question

2009-10-12 Thread Slick
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 To: beginners@perl.org Sent: Mon, October 12, 2009 4:40:51 PM Subject: question H

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;