Re: iterative algorithm for calculating the moving average
- From: "me" <me@xxxxxx>
- Date: Sat, 30 Apr 2005 02:06:54 GMT
Ron, thanks for your suggestion...this is what I am doing now.
The problem with this is that I still need to keep an array of the old
values. The array becomes
very big when I need to evaluate a 6hr moving average every minute (360
elements take up a lot of valuable resources on
an old real time system). That is why I need a recursive estimation
technique that does not require any indexing or reference to
the old values. Online, I only have an array of 20 elements available for
calculations and 50 steps to do the calculation.
Thanks!
Yannis
"Ron Shepard" <ron-shepard@xxxxxxxxxxxxxxxxxx> wrote in message
news:ron-shepard-A15862.23174428042005@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> In article <xkhce.1151947$8l.1071914@pd7tw1no>, "me" <me@xxxxxx>
> wrote:
>
> > Any ideas? Does anyone have any algorithms or references on the above
> > subject?
>
> Why not try the obvious solution, from the running total value
> subtract off the old "first" element, and add on the new "last"
> element? This might involve some accumulation of roundoff errors
> for very long strings of values, so you might want to reset
> everything every Nth step for some suitable value of N. This
> involves two adds and a multiplication for each time step,
> regardless of the number of elements in the running average.
>
> $.02 -Ron Shepard
.
- References:
- iterative algorithm for calculating the moving average
- From: me
- Re: iterative algorithm for calculating the moving average
- From: Ron Shepard
- iterative algorithm for calculating the moving average
- Prev by Date: relative errors
- Next by Date: Re: stop-test for iterative methods
- Previous by thread: Re: iterative algorithm for calculating the moving average
- Next by thread: Re: iterative algorithm for calculating the moving average
- Index(es):
Relevant Pages
|