comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: solution of linear equations
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: solution of linear equations [message #29382] Mon, 18 February 2002 08:23
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
dinhnq@yahoo.com (Dinh Huong) writes:
> Dear All,
>
> I am trying to find the solution for a series linear equations: Ax =
> 0, where A is a n by m matric, x is a n dimmensions vector. In my
> particular example, n=12, m=70, an overdetermined systems, can anyone
> kindly tell the method in IDL? I used SVDC and followed the way
> indicated in 'Using IDL' (page 348) but only obtained 0 for x,
> obviously this method can only return zero whenever B = 0. Any other
> suggestions? Thank in advance.


Hi Dinh--

If you thinking of a linear least-squares solution, this can be
commonly done with a QR decomposition of your matrix A. I'll leave
you to look up QR in something like Numerical Recipes (which doesn't
have much).

The heart of MPFIT, a *non*linear fitter, is a procedure which
linearizes the function, and then does exactly a QR factorization. I
have ripped out those routines into QRFAC and QRSOLV, and put them on
my web page. Perhaps these will help. See the EXAMPLE documentation
for QRSOLV to see how you would solve an equation.

Basically, you want to do,

QRFAC, A, R
X = QRSOLV(A, R, B)

where B is a zero-vector. Note that A is destroyed in the
factorization.

Good luck,
Craig

http://cow.physics.wisc.edu/~craigm/idl/idl.html (under Math)

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: contour plot keys?
Next Topic: positioning cursor in object graphics

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:54:57 PDT 2025

Total time taken to generate the page: 0.48011 seconds