[Top][All Lists]

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

Patch to spline.m in matcompat package

From: Trond Varslot
Subject: Patch to spline.m in matcompat package
Date: Mon, 28 Aug 2000 20:25:21 +0200 (CEST)


You have compiled an extensive package of compatibility functions. I use
it a lot, and fint it very useful.

I when I tried to use the function spline, however, it did not seem to
react very well to computing the value of a function in only 1 point (not
in only a few even. You might try this out:

x = 0:10; y = sin(x);xspline = 5.5; yspline = spline(x,y,xspline)

This is useful when computing a function based on tabular values. I
bellieve the following patch to spline.m should solve the problem, though
you might
have a more elegant solution:

<   h = x(idx+1) - x(idx);
>   h=x;
>   h(idx) = x(idx+1) - x(idx);

Yours sincerely
Trond Varslot

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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