#1153 cspline does not work


Maxima version: 5.11.0Maxima build date: 12:25 2/10/2007host type: i686-pc-mingw32lisp-implementation-type: GNU Common Lisp (GCL)lisp-implementation-version: GCL 2.6.8 I am running Vista on a pc and using

with p:matrix([-1,0.8619948],[-0.5,0.95802009],[0,1.0986123],[0.5,1.2943767])

cspline(p) gives
(%o5) 9.14034523948868*10^-22*(
This is a free or natural cubic spline and x^2 terms are supposed to be zero for the infinite range parts and the middle part which is indicated by charfun2(x,-.5,0) is the same as the part corresponding to
charfun2(x,0,inf) is the same except for the x^3 coefficient.


  • Robert Dodier

    Robert Dodier - 2007-03-30
    • labels: --> Share Libraries
    • assigned_to: nobody --> riotorto
  • Robert Dodier

    Robert Dodier - 2008-05-15

    Logged In: YES
    Originator: NO

    I don't understand what is the problem here. When I try this with cspline I get

    foo : (.06565092800000027*x^3+.1969527840000008*x^2

    and when I plot that via

    draw2d (explicit (foo, x, -2, 1), points ([-1, -0.5, 0, 0.5], [0.8619948, 0.95802009, 1.0986123, 1.2943767]));

    I see the spline is a smooth curve which passes through the points.

    Can someone point out what is wrong here?

  • Mario Rodriguez Riotorto

    Logged In: YES
    Originator: NO

    I don't see any problems. The abscissas from the given points range from a=-1 to b=0.5, and according to the definition of natural cubic splines, if p is the interpolation function, the boundary conditions are p''(a)=p''(b)=0; it's easy to check that the result given by cspline fits this restriction.

    I don't understand why "x^2 terms are supposed to be zero".

  • Robert Dodier

    Robert Dodier - 2008-05-16

    Logged In: YES
    Originator: NO

    Closing this report as "rejected". Mario, thanks for looking at it.

  • Robert Dodier

    Robert Dodier - 2008-05-16
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks