octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #63791] movmean - out of memory or dimension t


From: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #63791] movmean - out of memory or dimension too large for index type
Date: Sat, 11 Feb 2023 21:48:26 -0500 (EST)

Follow-up Comment #13, bug #63791 (project octave):

I still do not understan why I cannot reproduce this on any of my computers. I
just tried it on coreduo win 7 laptop w/ 8GB of ram
and it finished after 6 minutes w/o any problems.

On more practical note, you can approximate movmean with 
filter (or do even better with filtfilt from signal package):


octave:1> a= rand(1e6,1);
octave:2> N = 513;
octave:3> tic; b = movmean(a, N); toc
Elapsed time is 2.4628 seconds.
octave:4> tic; c = filter(ones(1,N)/N, 1, a); toc
Elapsed time is 0.201769 seconds.
octave:5> pkg load signal
octave:6> tic; d = filtfilt(ones(1,N)/N, 1, a); toc
Elapsed time is 0.740603 seconds.


First ~N points will be off. 

Dmitri.
-- 

_


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63791>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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