[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

spline problem

From: Paul Wellner Bou
Subject: spline problem
Date: Mon, 10 Jul 2006 15:31:34 +0200
User-agent: Thunderbird 1.5 (X11/20051201)


Yesterday I tried to calculate a spline with three points given and with hermit boundary conditions. Octave was not able to give me a spline with a continous first derivative in the point where the tow polynoms meet.

For example:

The points:
        (0,0), (1,0), (3,0)

The boundary conditions:
        S'(0) = 10
        S'(3) = 0

Calculating the spline with

        csape([0 1 3], [0 0 0], 'complete', [10 0]);

gives me a spline with matches exactly the given conditions but the first derivative in (1,0) is not continuous. Octave gives me that spline:

  P =

      6.00000  -16.00000   10.00000    0.00000
     -0.50000    2.00000   -2.00000    0.00000

Thats very nice, but p0'(1) = -4 and p1'(0) = -2 (considering that the origin of p1 is (1,0)). Is there any way to add this condition? To say octave that it should calculate a spline with a continuous first derivative?

There is a solution, so that's not the problem.

  P =

      6.66667  -16.66667   10.00000    0.00000
     -0.83333    3.33333   -3.33333    0.00000

And, by the way, why does octave warns me with "Warning: empty y range [0:0], adjusting to [-1:1]" plotting three points with an y-vector [0 0 0]? And what does it mean by "adjusting to [-1:1]? What is adjusted here?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]