[Top][All Lists]

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

resampling irregularly sampled data

From: Przemek Klosowski
Subject: resampling irregularly sampled data
Date: Fri, 23 Jun 2017 10:14:14 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

In Matlab the recommended method to resample irregularly sampled input data is:
[y, Ty] = resample(x,irregTx,desiredFs);
but Octave signal package's resample() function only handles already regularly sampled data:
error: resample.m: p and q must be positive integers
Is  resample() function worthy to be made Matlab-compatible here?

I don't think interp1 is the right approach because it just interpolates between nearest points instead of taking into account all points in the 'regularized' interval.

I got a working result by integrating within regular intervals:

 j=1; for i=dateEven; dataEven(j++)=sum(data(find((date>=i) & (date<i+.1)))); end

but is there a simpler and/or vectorized approach?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]