Fitting Data



On Tue, Jul 24, 2012 at 11:41 AM, Chris Maness <chris at chrismaness.com>wrote:

> I working on fitting some data two a 1st order equation of the form:
>
> [image: Inline image 1]  (L+.4*d=n*lambda/4)
>
> I know L,d, and n and I am trying to find value for lambda that will best
> fit my datum.
>
> I am playing with a really simple fit first, but I am failing.  Can anyone
> help me point out what I am missing?
>
> (%i156) M;
>                                    [ 1  1 ]
>                                    [      ]
> (%o156)                            [ 2  2 ]
>                                    [      ]
>                                    [ 3  3 ]
> (%i157) lsquares_estimates(M,x,A*x,A);
>
> length: argument cannot be a symbol; found x
> #0: lsquares_mse(data%=data,variables=x,equation=x*A)(lsquares.mac line
> 257)
> #1:
> lsquares_estimates(data=matrix([1,1],[2,2],[3,3]),variables=x,equation=x*A,parameters=A,optional_args=[])(lsquares.mac
> line 243)
>  -- an error. To debug this try: debugmode(true);
> (%i158)
>
> A is supposed to equal one because it is s simple y=x curve.
>
> Thanks,
> Chris Maness
>

Never, mind.  I was able to find a simpler example and I now understand.

Thanks,
Chris Maness
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2134 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120724/32b2822e/attachment.png>;