Sporadically sampled data

Ben Abbott bpabbott at mac.com
Wed Jun 25 19:20:52 CDT 2008


On Jun 25, 2008, at 7:59 PM, Shaun Jackman wrote:

> Jaroslav Hajek wrote:
>> On Thu, Jun 19, 2008 at 8:53 PM, Shaun Jackman <sjackman at bcgsc.ca>  
>> wrote:
>>> 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?
> ...
>> If you don't need to smooth the data, then you can simply use the
>> interpolating functions (interp1, spline, pchip), assuming your data
>> is 1-dimensional.
>> For smoothing data, you can use OctaveForge packages - data- 
>> smoothing, octgpr.
>
> Thanks, Jaroslav. interp1 and pchip helped a lot.
>
> If I have the same arrays of t and x, and now t has duplicate  
> values, how can I
> smooth this data? A more specific question: how can I generate new  
> arrays
> t_mean and x_mean where each value of t_mean is unique, and the  
> value of x_mean
> for each t_mean is the mean value of all the values of x at that  
> value of t?
>
> Thanks,
> Shaun

look at the function mean.

 > help mean

This function will produce a row vector whose length is equal to to  
the number of columns of the original matrix.

Ben



More information about the Help-octave mailing list