Interpolation function



On 12/12/05, Daniel Lakeland  wrote:

> Linear and Cubical splines would seem to be relatively easy to do in
> maxima and I'm tempted to try it myself over christmas.

sounds like a great idea to me. some random commentary --

 -- allow both numerical and symbolic data (atomic or non-atomic)
 -- program a straightforward method first

for a cubic spline, there are days when i'd like to see
an expression such as if x < 0 then a/4*x^3 - x + u elseif x < b then ....
i don't see a need to rule that out.
likewise for linear regression i don't see why the parameter estimates
couldn't be like b[1] = 0.23423 + 9.932*FOO - 5.234*bar, if FOO and bar
appear in the input data.

packages which are strictly numerical are going to run circles
around maxima on strictly numerical problems. maxima can
gain an advantage by enlarging the class of problems to which
it is applicable.

> As for least squares, anyone have any suggestions about the floating
> point numerical stability of lsquares.mac?

after glancing at lsquares.mac, it looks like it punts to solve
when the equations to be solved are linear or polynomial
and tries a numerical solution (mnewton) otherwise.
for linear equations, solve in turn calls linsolve which calls
a gaussian elimination function.

given all the other things that can go wrong, that seems OK to me.
i know the numerical analysis texts make a big deal about
condition of the design matrix or whatever it's called, but i've
yet to encounter a problem that couldn't be handled by just
centering the data. double precision arithmetic doesn't hurt either.

fwiw, and thanks for your interest in maxima,
robert dodier