On Sunday 28 December 2008 22:07 Robyn Hannigan wrote:
> Hello list,
> In learning the first few steps of Maxima, i am trying to find
> equation to model some conic sections. i have a model in English
> like
>
> at x = 0, y = 0
> at x = 10, y = 15
> at x = 150, y = 100
>
> Now i want to find some equation to fit this curve, at least to
> within some error (like an epsilon for slop, say +/-0.5)
>
> Is this a least mean squares error type fit, and if so, can i get
> some part of maxima to assist. i have only the fine manual but it
> is also very large.
>
> Any hints appreciated.
Check the lsquares package, if you really need the parametric
regression with least squares.
(%i1) load (lsquares) $
(%i2) D : matrix ([0,0], [10,15], [150,100]) $
(%i3) lsquares_estimates (D, [x,y], y = a*x + b, [a, b]);
(%o3) [[a = 541/844,b = 875/211]]
--
Prickle Prickle, Aftermath 72 YOLD 3174
Alexey Beshenov http://beshenov.ru/