help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fast poisson variates


From: Paul Kienzle
Subject: fast poisson variates
Date: Thu, 16 Mar 2006 07:04:52 -0500


On Mar 15, 2006, at 5:40 PM, John Swensen wrote:

In some recent work, I wasn't able to get our companies' only Matlab
Statistics toolbox license, so I switched to octave for a week or two.
I noticed that the poisson random function in octave took orders of
magnitude longer than Matlab's implementation.

randp in octave-forge is faster.


octave:5> tic; poisson_rnd(8,200,200); toc
ans = 2.0636
octave:6> tic; randp(8,200,200); toc
ans = 0.016264
octave:7> tic; poisson_rnd(18,200,200); toc
ans = 4.4133
octave:8> tic; randp(18,200,200); toc
ans = 0.029861
octave:9> tic; randp(18*ones(200),200,200); toc
ans = 0.27280

- Paul



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]