Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: linear equation with restrictions
Date: Mon, 28 Jul 2008 19:47:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 30
Message-ID: <g6l7nl$hpr$1@fred.mathworks.com>
References: <g5sgla$b7r$1@fred.mathworks.com> <g5sjfa$fbg$1@fred.mathworks.com> <g5td8a$s9q$1@fred.mathworks.com> <g5tep3$g7r$1@fred.mathworks.com> <g5thqi$h7d$1@fred.mathworks.com> <g5tj02$rj4$1@fred.mathworks.com> <g5tleq$siu$1@fred.mathworks.com> <g5ujb2$7c1$1@fred.mathworks.com> <g5v5rm$iav$1@fred.mathworks.com> <g60239$srl$1@fred.mathworks.com> <g62uv6$r2k$1@fred.mathworks.com> <g68au9$b8u$1@fred.mathworks.com> <g6iaid$rrr$1@fred.mathworks.com> <g6ic71$jqt$1@fred.mathworks.com> <g6l6lu$40r$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217274421 18235 172.30.248.37 (28 Jul 2008 19:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 28 Jul 2008 19:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:482289


"Leon galushko" <leonid.galushko@rwth-aachen.de> wrote in
message <g6l6lu$40r$1@fred.mathworks.com>...

> 
> '% Beware, his is Bruno's linprog, not MATLAB one in
> optimization
>     % tool box, the result may be different.
>     sol = linprog([], [], a', b, cost, L, U);'
> 
> Wouldn't run it with some Stadard- MatLab of mine?
> Leon

I don't know. I do not have MATLAB linprog and I try to
simulate it with my own LP solver obviously without succeed.

What I want to solve is this continue pb
  minimize cost * x with constraints
     L <= x <= U and a'*x = b

I'm not sure what is the correct syntax of MATLAB linprog to
ignore linear-inequality constraint, I put empty matrix but
MATLAB obviously doesn't like. Hope someone can help.

Otherwise could you try to replace with the following line
with a dummy inequality matrix:

sol = linprog(zeros(size(a')), 1, a', b, cost, L, U);

Bruno