Re: Moving average smoothing of curves in graphs



OK, I see, it is quite easy to implement. Just two more questions:
- should I use the same x_i values when evaluating the smoothed ones (I
guess the answer is yes).

You can use any x value for m(x), including the x_i values and anything
in between.  In fact there is no need to you splines for interpolation.

- how should I compute a default value for h ((last_x - first_x) / 10 ?)

For the "line" case, use (say) 10 * the _step_ you chose between x values.
For the "xy" case, use something like 10 * (last_x - first_x) / N.

(This way the half life does not change if you add more equidistant data
points.)

M.



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