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

Open discussion regarding features, bugs, issues, vendors, etc.

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

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.
fatalme

Posts: 10
Joined: Sun Jul 24, 2005 10:54 am

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
Julien Langou

Posts: 835
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

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
fatalme

Posts: 10
Joined: Sun Jul 24, 2005 10:54 am

Thanks for the url.
Julien Langou

Posts: 835
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

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

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
mbibby

Posts: 12
Joined: Sun Jun 12, 2005 1:12 pm
Location: MA