DSPRelated.com
Forums

cubic interpolation for nonuniformly sampled data

Started by hshakeeb June 15, 2009
Hi all

I need to use six-points cubic spline interpolator on non-uniformly
sampled input data. As matlab's spline function works with 4 points, I have
to code and implement it myself.

I shall be grateful if someone could point me out some references which
detail the theory of the said thing. Once I know it, I hope I would be able
to code without much hassle. Though I wouldn't mind using if something like
this has already been made by someone.

Many thanks.



hshakeeb wrote:

> Hi all > > I need to use six-points cubic spline interpolator on non-uniformly > sampled input data. As matlab's spline function works with 4 points, I have > to code and implement it myself. > > I shall be grateful if someone could point me out some references which > detail the theory of the said thing. Once I know it, I hope I would be able > to code without much hassle. Though I wouldn't mind using if something like > this has already been made by someone. > > Many thanks. > >
On Mon, 15 Jun 2009 06:43:08 -0500, hshakeeb wrote:

> Hi all > > I need to use six-points cubic spline interpolator on non-uniformly > sampled input data. As matlab's spline function works with 4 points, I > have to code and implement it myself. > > I shall be grateful if someone could point me out some references which > detail the theory of the said thing. Once I know it, I hope I would be > able to code without much hassle. Though I wouldn't mind using if > something like this has already been made by someone. > > Many thanks.
Such an artificial set of constraints screams "Homework!", and whispers that perhaps you misunderstand splines. Normally, splines are used to find a nice smooth curve that goes through a set of points. Each section between points will have it's own cubic that describes the evolution of the curve, and each of these sections will depend on the positions of the four surrounding points (with special treatment at the end points). Because each section is determined by only four points, the problem is neither over- nor under-constrained. Because you generate as many sections as you need, it'll work fine for six defining points. If you _really_ need to generate a cubic spline from _six_ surrounding points, then you are guaranteeing that your problem will be overconstrained; this, in turn, guarantees that any 'solution' will be approximate, and that there will be an infinite number of possible methods of coming up with said solution. If there is some _specific_ algorithm out there that you are being asked to conform to, I suggest that you find out what it is, either by doing web searches or by asking your instructor/manager/technical lead. But first, ask yourself if you don't just need to find a plain-jane spline for a vector with six points. -- www.wescottdesign.com
http://www.fpgacentral.com/group/dsp/cubic-interpolation-nonuniformly-sampled-data-91072/#post479520

I  wasn't aware how the posts here are reflected on fpga central so I made
a response there. Now if that appears here too, then my apologies to
everyone and especially mods for the unintentional glitch.