|
From: | Shaun Jackman |
Subject: | Sporadically sampled data |
Date: | Thu, 19 Jun 2008 11:53:38 -0700 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080421) |
I want to calculate a moving average (a sliding window) of my data. If I had periodically sampled data, I would use hanning and conv. Right now I'm converting my sporadically sampled data to periodically sampled data by...
p(t) = x; y = conv(p, hanning(n));This is not ideal though, because there are gaps in the sampling data, and assuming those gaps are 0 (or the mean) is not ideal.
My current thought to improve on this is select all the data points that fall within a sliding window using `find`, calculate the mean (or some weighted mean based on position in the window) of the data points in that window, and repeat in a loop. Before I proceed down this path, I wanted to know if Octave has any functions to deal with this sort of data.
Thanks, Shaun
[Prev in Thread] | Current Thread | [Next in Thread] |