help-octave
[Top][All Lists]
Advanced

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

Re: mean filter, another implementation


From: Dmitri A. Sergatskov
Subject: Re: mean filter, another implementation
Date: Sun, 24 Jul 2005 09:40:47 -0600
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Søren Hauberg wrote:

tic; mymeanfilter(data,n); toc   ans = 2.9098

I looked at .cc code -- you can probably speed it up by another 10%
if you replace

out(i) = sum/(double)n;

with

out(i) = w*sum;

where

const double w = 1.0/n;

declared somewhere outside the loop.

Regards,

Dmitri.
--



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