🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: sci.math.symbolic
2 messages
2 total messages Started by Hugh D. Gamble Tue, 26 Jan 1993 22:13
Curve fitting with Maple?
#1032
Author: Hugh D. Gamble
Date: Tue, 26 Jan 1993 22:13
29 lines
1517 bytes
I know there are lots of s/w packages specifically for curve fitting,
and I could whip up a least squares fit algorithm in C and use it, but
what I want to do should be easy to do from Maple, I think, if I knew
how.

I want to fit a set of x,y datapoints to a 2nd order polynomial.
There's the interp function that will fit n datapoints to an n-1th
degree polynomial, but I can't see how to tell it to fit to a 2nd
order equation except by just giving 3 datapoints. :-(

If I could extract the code from the interp routine, it would probably
be easy to change it to accept the degree as a parameter.

I looked at regress from the stats package, but it didn't seem very
useful for this. Maybe it is, but I don't understand the input data
formats?

Is interp actually useful for curve fitting, or is it just a freebie
that's there because it was needed internally when drawing pretty
pictures? 

Comments? Thanks.



-- 
# Hugh D. Gamble, NTT Systems Inc. (at DCIEM (416) 635-2156) Std. Disclaimers #
# hugh@dciem.dciem.dnd.ca, hugh@kink.PhaedraV.On.Ca                           #
# "automata da vida, honey" - CA Butterfly                                    #
Re: Curve fitting with Maple?
#992
Author: Michael
Date: Wed, 27 Jan 1993 13:51
24 lines
1538 bytes
In article <7007@dciem.dciem.dnd.ca>, hugh@dciem.dciem.dnd.ca (Hugh D. Gamble) writes:
> I know there are lots of s/w packages specifically for curve fitting,
> and I could whip up a least squares fit algorithm in C and use it, but
> what I want to do should be easy to do from Maple, I think, if I knew
> how.
> 
> I want to fit a set of x,y datapoints to a 2nd order polynomial.
> ...
> 
> Comments? Thanks.
> 
> Hugh D. Gamble, NTT Systems Inc. (at DCIEM (416) 635-2156) Std. Disclaimers #
============
Dear Hugh,

The routine "fit" in the Maple share library is hopefully what you need.
fit( X, Y, [1,t,t^2], t ); will return a quadratic polynomial in t which
fits the data X,Y in the least squares sense.
You can get the routine from the Maple share library using anonyous
ftp at daisy.uwaterloo.ca or ftp.inria.fr or neptune.inf.ethz.ch
It's the file maple/5.0/share/fit.  Alternatively, using e-mail, send an
message to maple-netlib@can.nl consisting of the text "send info".

Michael Monagan
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads