[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
piecewise spline approximation
From: |
WizardOfBoz |
Subject: |
piecewise spline approximation |
Date: |
Mon, 22 Apr 2013 07:50:00 -0700 (PDT) |
My goal is to get a small number of spline functions that approximate a much
larger number of points.
I have X-Y data. Both X and Y are nbig x 1. If I run a cubic spline fit
using spline or interp1, I get back an nbig by 4 matrix of polynomial
coefficients. Too many parameters for my application.
If I create a vector Xsmall, which is nsmall x 1, and use
interp1(X,Y,XSmall), I get back interpolated Y values but not polynomial
coefficients. I need the coefficients.
So if I have a complex waveform with hundreds of points, I'd like to figure
out how to get a series of (for example) five or at most ten spline
functions that approximate the waveform. So I generate an Xsmall matrix
with Xsmall = [0, t1, t2, t3, ... t7];, and end up with a 7x4 matrix of
cubic spline coefficients such that the coefficients from row 1 approximate
my waveform from time 0 to t1, the second row from t1 to t2, etc...
This may be easy and obvious. Help in pointing me in the right direction is
appreciated.
Thanks,
Wiz
--
View this message in context:
http://octave.1599824.n4.nabble.com/piecewise-spline-approximation-tp4652111.html
Sent from the Octave - General mailing list archive at Nabble.com.
- piecewise spline approximation,
WizardOfBoz <=