Re: Moving average smoothing of curves in graphs
- From: Morten Welinder <mwelinder gmail com>
- To: Jean Bréfort <jean brefort normalesup org>
- Cc: "gnumeric-list gnome org" <gnumeric-list gnome org>
- Subject: Re: Moving average smoothing of curves in graphs
- Date: Thu, 9 Feb 2006 13:35:06 -0500
Original data: f(x_i) = y_i
sum_i (f(x_i) * w_i(x))
m(x) = --------------------------- (*)
sum_i w_i(x)
/ 0 , if x_i > x
w_i(x) = {
\ 2^((x_i-x)/h) , if x_i <= x
The "0" part ensures that as you draw the graph left-to-right, only points
to the left of where you are affect m(x).
Notice that for d>=0:
w_i(x+d) = 2^(-d/h) * w_i(x)
which makes it easy to compute (*) because it stays constant between
the x_i's and you can easily compute the new nominator and denominator
from the old ones and the new data point.
M.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]