help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: underdetermined


From: Jordi Gutiérrez Hermoso
Subject: Re: underdetermined
Date: Thu, 1 Jul 2010 10:30:03 -0500

O010/7/1 Jaana Tommiska <address@hidden>:
> If Ax=b is underdetermined, does A\b calculate minimum 2-norm solution ?

Yes. Look here for where the division operators are defined:

     http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/src/xdiv.cc#l343

The solve functions that do all the work are declared here:

     
http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/liboctave/dMatrix.h#l179

If you go look at the definition of solve, you see that it first
checks for some basic matrix types, and if it's singular or
rectangular, it calls lssolve (least squares solve):

     
http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/liboctave/dMatrix.cc#l1928

The definition of which is here, further down that file:

     
http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/liboctave/dMatrix.cc#l2227

where you can see that it finally calls the Fortran functions DGELSD
(lines 2272 and 2279).

Finally, if you consult a BLAS/LAPACK reference, because Octave no
longer ships versions of those libraries with itself, you'll find:

     http://www.netlib.org/lapack/double/dgelsd.f

So that's your answer. That's the function that it eventually calls in
the situation you describe, and you can look at the code above to see
exactly how and with what parameters it calls it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]