Lisp - expanding space for Maxima in Windows




On Tue, 20 Apr 2010, Brian Wylie wrote:

< Thanks to everyone for the replies.
< 
< Actually, a numerical solution is exactly what I'm looking for - I'm
< trying to calculate constants given preprocessed input data. I've
< preprocessed sample data in Matlab, as that is very easy to do for my
< purposes. However, without symbolic maths license, I needed a way of
< symbolically creating the equations relevant to the input data, and
< finally solving for them. At the end of the day, I want to calculate 9
< constants.
< 
< Attached is the file. The P matrix is the numerical preformatted input
< data. The last command is where I get stuck. If I'm looking for a
< numerical solution, am I going about it the correct way?
< 
< Have I grossly misunderstood about what I should use Maxima for? The
< examples seem to suggest it is useful for solving nonlinear equations
< like this, giving numerical output where a symbolic output is not
< appropriate...
< 
< Cheers,
< Brian
 
Brian,
If you are solving equations numerically, then you can use
mnewton.

(%i2) eqs : [x^2+y^2=1,x+y=0]$

(%i3) vars : [x,y]$

(%i4) ics : [2,0]$

(%i5) load("mnewton")$

(%i6) mnewton(eqs,vars,ics);

(%o6) [[x = .7071067811865475,y = -.7071067811865475]]

==> note only one of two solutions are found with this choice of ics.

If you are actually estimating parameters, then Maxima has
lsquares_estimates_approximate, which does non-linear least
squares.

To obtain help on a subject, type 

? subject

at the Maxima command-line. In particular, you'll need to load
either of these functions' packages.

Leo 

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.