in reply to Finding local maxima/minima in noisy, pediodic data
Tweak the alpha to get at the desired frequency band.use constant { alpha => 0.1, }; my ($prev_x, $prev_y) = (0, 0); while (<>) { my ($t, $x, $y) = split; $x = $prev_x + alpha * ($x - $prev_x); $prev_x = $x; $y = $prev_y + alpha * ($y - $prev_y); $prev_y = $y; print "$t $x $y\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding local maxima/minima in noisy, pediodic data
by Anonymous Monk on Oct 12, 2009 at 22:09 UTC | |
|
Re^2: Finding local maxima/minima in noisy, pediodic data
by Anonymous Monk on Oct 13, 2009 at 00:22 UTC | |
by kikuchiyo (Hermit) on Oct 13, 2009 at 09:02 UTC | |
by mpeg4codec (Pilgrim) on Oct 13, 2009 at 20:20 UTC |