[Top][All Lists]

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

Re: Modifications to hist.m

From: Alois Schlögl
Subject: Re: Modifications to hist.m
Date: Mon, 17 Mar 2003 09:43:39 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

Paul Kienzle wrote:

Andy Adler wrote:

I propose the following patch to hist.m;
it results in about 2.5x speedup.

At one point a rewrote hist to not have any
loops.  I was doing a whole lot of really large
histograms (e.g., 100000 values drawn from
a poisson distribution --- I had to rewrite the
poisson generator too ;-)

Please check it out and tell me if it is any faster
than what you've got.  I think it might be slower
if you have a histogram with a lot of empty bins.


Paul Kienzle

The original HIST.M was also to slow for me. My solution was implementing HISTO.M (see octave-forge/extra/tsa/ ) and the companion functions histo2, histo3, histo4 (histo2, histo3, and histo4 differ only if the input has multiple columns). All HISTO.M's use SORT.

However, HISTO has another difference: each sample value gets its own bin. For this reason, HISTO.M is not 1-to-1 compatible to HIST.M. I prefer the result from HISTO, because the bins do not depend on (max and min of) the samples as in HIST.


reply via email to

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