cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

cspline

SOLVED
Highlighted
Emerald III

cspline

Has somebody Mathcad sheet which return coefficient a, b, c and d of the equations y=a*x^3+b*x^2+c*x+d of the cspline?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: cspline

I have this version.

koeff cspline.JPG

View solution in original post

Tags (1)
8 REPLIES 8

Re: cspline

In the good old Mathsoft days we were offered "The Mathcad Treasury" and there Paul Lorczak shed some light on the meaning of the vector produced by "cspline". Unfortunately at the time I have no access to the Treasury but as a long time Mathcad user you probably have it lying (3 1/2 " disks !!) around in a drawer. Find it and look up "Computational insights_Think before you spline" or maybe "Cubic splines and alternative curve fitting techniques" - not sure.

Chances are that you will find the information, you are looking for, right there.

According to the Mathcad documentation (yes folks, there were times when Mathcad would come with a good solid user guide and complete reference) the vector created by cspline contains, among other things, the second derivatives for the spline curve(s).

 

Re: cspline

You'll consider this cheating, but we can work backwards from the spline mathcad produces.  Probably not what you want, but you do get the coefficients.  Here - I let MC do the fit, take 100 points along each segment and create a fit for each segment.  Seems to work. Attached is the file, along with another that seems to imitate lspline quite well.

2018-03-24_13-55-09.jpg

Re: cspline


@DJF wrote:

You'll consider this cheating, but we can work backwards from the spline mathcad produces.

Its sure cheating, but its a very clever cheat 😉

After playing around with your sheet and knowing that the vector created by cspline contains the second derivatives, it was quite easy to derive the coefficients directly from that vector:

Bild.png

Re: cspline

I have this version.

koeff cspline.JPG

View solution in original post

Tags (1)

Re: cspline

Thanks Valery!

But solution without animation is not solution!

14-13-koeff-cspline.gif

Re: cspline

One picture for more understanding: 4 equations with 4 unknown (coefficients a, b, c and).

14-13-koeff-cspline.png

Re: cspline

Or so! Like ODE but not ODE

14-13-koeff-cspline-d.png

Re: cspline

Here is a non-cheating version (i.e. never using cspline). Bit crude but seems to work. See: 

https://www.researchgate.net/publication/236029592_Cubic_spline_interpolation_using_Mathcad 

for a good paper on how cspline, pspline and lspline work.

4.0 and pdf attached.