Antw: Re: How to use Maxima to do a nonlinear fit?
- Subject: Antw: Re: How to use Maxima to do a nonlinear fit?
- From: Robert Gloeckner
- Date: Thu, 16 Nov 2006 22:22:08 +0100
** Reply Requested When Convenient **
>>> Mario Rodriguez <biomates at telefonica.net> schrieb am Mittwoch, 15. November
2006 um 20:55:
>>
>> is there a package/code-snippet for fitting nonlinear functions to datasets?
>>
>
> Did you try lsquares?
yes. but i did not get very far as you can see here. i think i need to know how to read data from file to matrix. i have seen the post from r. fateman about reading a list via lisp-reader (http://article.gmane.org/gmane.comp.mathematics.maxima.general/11671), but i have to admit, that i do not know how to use this to generate matrices....
(%i4) m : matrix ( [280, 0, 0, 0.251], [260, 0, 0, 0.237], [240, 0, 0, 0.231], [220, 0, 0, 0.229], [200, 0, 0, 0.236], [180, 0, 0, 0.232], [160, 0, 0, 0.227], [140, 0, 0, 0.228], [120, 0, 0, 0.231], [100, 0, 0, 0.227], [80, 0, 0, 0.224], [60, 0, 0, 0.219], [40, 0, 0, 0.237], [280, 0, 2, 0.255], [260, 0, 2, 0.245], [240, 0, 2, 0.239], [220, 0, 2, 0.244], [200, 0, 2, 0.246], [180, 0, 2, 0.234], [160, 0, 2, 0.234], [140, 0, 2, 0.233], [120, 0, 2, 0.227], [100, 0, 2, 0.220], [80, 0, 2, 0.217], [60, 0, 2, 0.217], [40, 0, 2, 0.230], [280, 0, 4, 0.264], [260, 0, 4, 0.243], [240, 0, 4, 0.237], [220, 0, 4, 0.244], [200, 0, 4, 0.248], [180, 0, 4, 0.240], [160, 0, 4, 0.237], [140, 0, 4, 0.231], [120, 0, 4, 0.227], [100, 0, 4, 0.229], [80, 0, 4, 0.227], [60, 0, 4, 0.219], [40, 0, 4, 0.241], [280, 0, 8, 0.265], [260, 0, 8, 0.251], [240, 0, 8, 0.244], [220, 0, 8, 0.248], [200, 0, 8, 0.256], [180, 0, 8, 0.243], [160, 0, 8, 0.241], [140, 0, 8, 0.236], [120, 0, 8, 0.231], [100, 0, 8, 0.225], [80, 0, 8, 0.218], [60, 0, 8, 0.214], [40, 0, 8, 0.233], [280, 7, 0, 0.254], [260, 7, 0, 0.243], [240, 7, 0, 0.239], [220, 7, 0, 0.242], [200, 7, 0, 0.245], [180, 7, 0, 0.244], [160, 7, 0, 0.240], [140, 7, 0, 0.239], [120, 7, 0, 0.234], [100, 7, 0, 0.238], [80, 7, 0, 0.229], [60, 7, 0, 0.230], [40, 7, 0, 0.249], [280, 7, 2, 0.257], [260, 7, 2, 0.248], [240, 7, 2, 0.240], [220, 7, 2, 0.254], [200, 7, 2, 0.249], [180, 7, 2, 0.239], [160, 7, 2, 0.237], [140, 7, 2, 0.229], [120, 7, 2, 0.224], [100, 7, 2, 0.224], [80, 7, 2, 0.222], [60, 7, 2, 0.231], [40, 7, 2, 0.250], [280, 7, 4, 0.268], [260, 7, 4, 0.252], [240, 7, 4, 0.246], [220, 7, 4, 0.250], [200, 7, 4, 0.256], [180, 7, 4, 0.244], [160, 7, 4, 0.243], [140, 7, 4, 0.239], [120, 7, 4, 0.231], [100, 7, 4, 0.224], [80, 7, 4, 0.217], [60, 7, 4, 0.211], [40, 7, 4, 0.226], [280, 7, 8, 0.274], [260, 7, 8, 0.259], [240, 7, 8, 0.255], [220, 7, 8, 0.253], [200, 7, 8, 0.262], [180, 7, 8, 0.256], [160, 7, 8, 0.251], [140, 7, 8, 0.247], [120, 7, 8, 0.237], [100, 7, 8, 0.232], [80, 7, 8, 0.225], [60, 7, 8, 0.225], [40, 7, 8, 0.239], [280, 22, 0, 0.271], [260, 22, 0, 0.256], [240, 22, 0, 0.256], [220, 22, 0, 0.255], [200, 22, 0, 0.257], [180, 22, 0, 0.247], [160, 22, 0, 0.240], [140, 22, 0, 0.239], [120, 22, 0, 0.232], [100, 22, 0, 0.230], [80, 22, 0, 0.228], [60, 22, 0, 0.231], [40, 22, 0, 0.257], [280, 22, 2, 0.278], [260, 22, 2, 0.263], [240, 22, 2, 0.257], [220, 22, 2, 0.257], [200, 22, 2, 0.260], [180, 22, 2, 0.254], [160, 22, 2, 0.248], [140, 22, 2, 0.242], [120, 22, 2, 0.230], [100, 22, 2, 0.224], [80, 22, 2, 0.216], [60, 22, 2, 0.213], [40, 22, 2, 0.237], [280, 22, 4, 0.279], [260, 22, 4, 0.267], [240, 22, 4, 0.260], [220, 22, 4, 0.262], [200, 22, 4, 0.268], [180, 22, 4, 0.261], [160, 22, 4, 0.255], [140, 22, 4, 0.247], [120, 22, 4, 0.238], [100, 22, 4, 0.230], [80, 22, 4, 0.224], [60, 22, 4, 0.217], [40, 22, 4, 0.235], [280, 22, 8, 0.290], [260, 22, 8, 0.272], [240, 22, 8, 0.270], [220, 22, 8, 0.265], [200, 22, 8, 0.277], [180, 22, 8, 0.269], [160, 22, 8, 0.264], [140, 22, 8, 0.254], [120, 22, 8, 0.244], [100, 22, 8, 0.236], [80, 22, 8, 0.229], [60, 22, 8, 0.223], [40, 22, 8, 0.238])$
Maxima encountered a Lisp error:
Error in MACSYMA-TOP-LEVEL [or a callee]: MACSYMA-TOP-LEVEL [or a callee] requires less than one hundred fifty-six arguments.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i5)
Tanks for your answer,
Robert