DSPRelated.com
Forums

Interpolation

Started by rosy...@gmail.com January 18, 2006
Hi

Is there any kind of interpolation like spline, nearest
neighbor(weighted) that can be used for interpolating a nonuniform data
?

Suppose x = [1 2 4 5 6 8 9 10 12....]
and y=f(x) = [0 -2 4 -3 5 -6....]
and i want to find yy corresponding to xx = [1.8  5.8  9.8..]

How should I proceed? And can somebody please tell me equations used in
spline as applied to this example!!

Thanks
Rose

rosy27@gmail.com wrote:
> Is there any kind of interpolation like spline, nearest > neighbor(weighted) that can be used for interpolating a nonuniform data > ? > > Suppose x = [1 2 4 5 6 8 9 10 12....] > and y=f(x) = [0 -2 4 -3 5 -6....] > and i want to find yy corresponding to xx = [1.8 5.8 9.8..]
There are lots of ways to generate maybe wrong or maybe useful answers to common class homework questions such as the above. The first questions to ask might be: Is the original data set constrained in some manner, and, if so, how; and what characteristics do you want out of the answer? e.g. Is the original data set bandlimited somehow? And do you want your interpolated result to pass thru the original data set points or just nearby? If the data resembles something bandlimited, one method I might try to get a possibly interesting result is to calculate some number of FT coefficients over a data window (how many might depend on the max frequency which might be expected to be present in the original data set); and then regenerate a continuous waveform using the summed sin and cos coefficients from which to take some values at the interpolated points. Linear, polynomial, spline interpolations of various degrees are all detailed in most numerical analysis textbooks. Look there. IMHO. YMMV. -- rhn A.T nicholson d.O.t C-o-M
Ron N. wrote:

   ...

> are all detailed in most numerical analysis textbooks. Look > there.
Don't overlook Numerical recipes: http://www.nr.com/. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������