help-octave
[Top][All Lists]
Advanced

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

Re: fast poisson variates


From: Michael Creel
Subject: Re: fast poisson variates
Date: Thu, 16 Mar 2006 15:03:36 +0000
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

This sort of duplicated functionality, with the better version being in o-f rather than in Octave itself is no doubt a source of confusion for new users. and for more experienced users with bad memories. :-)

Is the o-f version of rand in 2.9.4? I can't remember!

Michael

Paul Kienzle wrote:

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
-------------------------------------------------------------




-------------------------------------------------------------
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]