Date: Thu, 19 Jun 2008 11:53:38 -0700
From: Shaun Jackman <address@hidden>
Subject: Sporadically sampled data
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=UTF-8; format=flowed
I have data sampled sporadically from a function x = f(t); I have vectors t and
x. Does Matlab have any functions to deal with sporadically sampled data?
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