### What subroutine solve the underdetermind linear system Ax=B?

Posted:

**Wed Sep 21, 2005 7:39 am**
by **fatalme**

Hello, everyone:

I need to solve a underdetermined linear systems, Ax=B, where A is m by n, and m<n, and x must be positive. Is there any subrotine in Lapack could solve my problem? What's its name? Thanks very much!

Best Regards.

Posted:

**Wed Sep 21, 2005 3:30 pm**
by **Julien Langou**

Not to my knowledge.

xGELS handles the underdetermined case however the constraint on x is to have minimum 2-norm. If your constraint is to have positive elements in x, there is no driver in LAPACK for this.

Julien

Posted:

**Thu Sep 22, 2005 12:34 am**
by **fatalme**

I think out a method. that is to make X=Y+C, while C is a constant larger than max(abs(X)), for example 5, then solve the least square problem of Y. or using the code NNLS from internet:

http://hesperia.gsfc.nasa.gov/~schmahl/nnls/nnls.for
Julien Langou wrote:Not to my knowledge.

xGELS handles the underdetermined case however the constraint on x is to have minimum 2-norm. If your constraint is to have positive elements in x, there is no driver in LAPACK for this.

Julien

### What subroutine solve the underdetermind linear system Ax=B?

Posted:

**Thu Jan 26, 2006 2:17 pm**
by **mbibby**

Fatalme, review "SVD for fwer equations than unknowns in "Numerical Recipes in Fortan 77". Then use one of the LAPACK SVD routines.

Malcolm M Bibby