Re: Cubic spline interpolation
- From: John D'Errico <woodchips@xxxxxxxxxxxxxxxx>
- Date: Fri, 15 Sep 2006 13:45:48 GMT
In article <ef40d78.1@xxxxxxxxxxxxxxxxxxxxxxx>, Pawel <prulikowski@xxxxxxxxxxxxxxx> wrote:
Thanks a lot John pchip seems to do the job however You mention :
"(...)The best
that you can do is an approximation ifHow can I find compute these C2 interpolants within a Matlab - would
you require C2 continuity in a spline.
If you are willing to use other tools
than a traditional cubic spline, there
are C2 interpolants that will work too,(...)"
You have some, not too heavy, paper that treats these problems, I am
a microwave designer not a mathematician...
One that I always thought was good was a
rational quadratic formulation. See
Delbourgo, R.; Gregory, J.A.; 'C2 Rational
Quadratic Spline Interpolation to Monotonic
Data', IMA Journal of Numerical Analysis,
1983, 141-152
Again, the locally monotone nature of the
spline makes it also unable to exceed the
boundaries of your data. So you get your
positivity constraints automatically.
The downside of these rational quadratic
curves is the solution. Its a nonlinear
problem, so an iterative scheme is required.
They show it to be a convergent one though,
and its not terribly slow. In my experience,
I found it to be roughly about 10x slower
then the simpler pchip. Since we did have
some applications that needed the extra
smoothness, the time penalty was considered
acceptable.
Is the paper readable? I'll guess it is.
if you stick to the parts abut how to
build the spline, it was definitely
readable. There is only one caveat with
these splines. You will encounter a
singularity in the evaluation of segments
which are constant functions. Its not hard
to test for this in advance however.
John
--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945
Those who can't laugh at themselves leave the job to others.
Anonymous
.
- References:
- Cubic spline interpolation
- From: Pawel
- Re: Cubic spline interpolation
- From: John D'Errico
- Re: Cubic spline interpolation
- From: Pawel
- Cubic spline interpolation
- Prev by Date: border around mask
- Next by Date: subplot colorbar
- Previous by thread: Re: Cubic spline interpolation
- Next by thread: Save
- Index(es):
Relevant Pages
|