Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: underdetermined linear equation system
Date: Sun, 11 Oct 2009 15:59:03 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 35
Message-ID: <hasvc7$sbm$1@fred.mathworks.com>
References: <hasu5b$di4$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1255276743 29046 172.30.248.35 (11 Oct 2009 15:59:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 11 Oct 2009 15:59:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:576522


"arnold szilagyi" <john.doe.nospam@mathworks.com> wrote in message <hasu5b$di4$1@fred.mathworks.com>...
> hello,
> 
> I have a big an very urgent problem. I have to solve an equation system in this way:
> 
> I have 50 unknows, and 8-15 equations. I have an initiative solution, so I'm looking for an iterative method to solve the system.
> 
> Since I'm not a mathematician, I googled a lot for an appropiate method, but I couldn't find nothing. 
> I tried the mldivide function of the matlab, but it is not good for me. the solutions must be all positive, and matlab gives me a lot of zeros (I know that's the way it solves the system with mldivide).
> 

What you must specify how you want your solution to be, among the infinity number of solutions of

A*x = b % A is (8 x 50) matrix

For example, if you tell
|x| is minimal, % where |x| is sqrt(sum(x.^2))

then the solution is
x = pinv(A)*b

If you want solution to be all positive, then you need to add

A*x = b
x >= epsilon

where epsilon is a small positive number. The positive constraints alone are *not* enough solve the system. You might want 

min J(x) := |x|^2 such that
A*x = b
x >= epsilon

This is quadratic programming. If you have optilmization toolbox, the function QUADPROG will do that for you.

Bruno