MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to solve the system of linear equations?


In article <8r17ui$h8r at smc.vnet.net>, Zak Levi <zaklevi at yahoo.com>
wrote:

> Dear Mathematica experts,
> 
> How to solve, in Mathematica, the system of linear equations,
> 
> when a number of equations is larger than a number of variables.
> 
> Another system easily pass to apply LSM in this case, but it seems to
> me that there is no such opportunity in Mathematica.
> 
> As an application, given N>5 points at plane, how to calculate (the
> parameters) of best fitting ellipse. 
> 
> Thanks a lot,
> ZL

This is what I have done before:

FindMinimum[Apply[Plus, Map[(# #)&,
    {A11 X1 + A12 X2 + ... + A1n Xn - B1,
     A21 X1 + A22 X2 + ... + A2n Xn - B2,
     ...
     Am1 X1 + Am2 X2 + ... + Amn Xn - Bm} ] ],
     {X1, 0.0}, {X2, 0.0}, ... {Xn, 0.0} ]

This is a least square error minimization for m equations in n
variables (m >= n) in the standard A X = B form. The (# #) is because I
can't do exponents in plain text.  You may have to change the zeros to
some other appropriate initial conditions.


  • Prev by Date: Re: List element manipulation
  • Next by Date: Re: List element manipulation
  • Previous by thread: Re: How to solve the system of linear equations?
  • Next by thread: Re: How to solve the system of linear equations?