Here's a brief explanation of how it's done in general. Mathlab might have a few numerical algorithms embedded in it to make the solution easier for it.
-Dan
I've got a few questions related to fitting cubic splines to data.
1.) how is it done? I know you can do it in matlab but how is it done in matlab? In other words i'm interested in how matlab as a program does it and not the process of doing them in matlab as you would find in the matlab manual.
2.) what is the implication of having 2 or 3 or more points in your data that are on the same level... how does a cubic spline fit over those?
Here's a brief explanation of how it's done in general. Mathlab might have a few numerical algorithms embedded in it to make the solution easier for it.
-Dan
Wikipedia is usually a good starting point too:
Spline interpolation - Wikipedia, the free encyclopedia
Are you still on it? Do you still have doubts with it?
I wrote a spline function that imitates MATLAB's not too long ago.
You can check the mathworks site, goto cleve moler's page. He has fully described the cubic splines in a neat way.
I believe MATLAB uses both clamped and Natural as inputs.
It is generaly usefull to give a link or the URL when refering to something
on the net.
Also Cleve's book Numerical Computing with MATLAB is available on
line at:
The MathWorks - Numerical Computing with MATLAB by Cleve Moler
and the chaper relevant to this question at:
Chapter 3 Interpolation
RonL
Isomorphism,
Were you able to immitate the Matlab implementation in c/c++? or did you follow the book 'A practical guide to Splines' to come up with the implementation?
I have a need in my project to develop c++ equivalent of Matlab cubic spline functionality. I don't have the book right now, but I'm trying to judge what is the best route I should take!
Has anyone else had the experience in implementing the cubic spline functionality?
Thanks
Not quite sure, whether we are on the same page but I found some good resources out there demonstrating various spline methods that I think are easy enough to code in C++. I think you will be able to find code for it already done and publicly available if you look around anyway.