Path: news.mathworks.com!not-for-mail
From: "Miroslav Balda" <miroslav.nospam@balda.cz>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Solve non linear constraint optimization
Date: Sun, 25 Jan 2009 21:33:03 +0000 (UTC)
Organization: Miroslav Balda
Lines: 39
Message-ID: <glilqf$ldt$1@fred.mathworks.com>
References: <9dc7b2b2-6103-47dc-a474-c7fda15518c8@t26g2000prh.googlegroups.com> <6d9101fd-1d79-4642-85a0-4a12ba228829@v18g2000pro.googlegroups.com>
Reply-To: "Miroslav Balda" <miroslav.nospam@balda.cz>
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 1232919183 21949 172.30.248.35 (25 Jan 2009 21:33:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 25 Jan 2009 21:33:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 360709
Xref: news.mathworks.com comp.soft-sys.matlab:513841


fas <faisalmufti@gmail.com> wrote in message <6d9101fd-1d79-4642-85a0-4a12ba228829@v18g2000pro.googlegroups.com>...
> On Jan 25, 1:49=A0am, "Matt " <mjacobson.removet...@xorantech.com>
> wrote:
> > fas <faisalmu...@gmail.com> wrote in message <9dc7b2b2-6103-47dc-a474-c7f=
> da1551...@t26g2000prh.googlegroups.com>...
> > > I want to minimize this constraint least square to find a and b. Had
> > > it be a linear system it would be probably easy to solve this
> > > constraint problem. =A0But I have this function of non linear equations
> > > to solve.
> > > f=3Dsum[x*x']*[a,b,b^2/(4*a)]' - sum[y*x] +lambda*[-b^2/(4*a^2), (1/2)*
> > > (b/a),-1]'=3D0
> > > Here x,y are vectors in R3 =A0and sum is over i to n;
> > > Can anyone help me solve this optimization.
> >
> > Probably not, since you've told us neither what the objective function is=
> , nor the constraint.
> >
> > It looks like you've given us Euler's equation above, but it will not be =
> enough. We will need at minimum to know the
> 
> The constraint in this case is b^2/(4*a)=3Dconstant.
> It is some what similar to the case of first example of Lagranage
> multipliers at
> http://en.wikipedia.org/wiki/Lagrange_multipliers
> where the third equation is non linear.

Hello,
I think that the solution can be found by the least squares problem solution defined as a system of 4 equations for row vectors x and y
     xx = x*x';
     yx = y*x'; % I think that transposition by x has been vergotten
     res = @(z) [xx*[z(1); z(2); z(2)^2/(4*z(1))] - yx + ...
                      lambda*[-z(2)^2/(4*z(1)^2); (1/2)*(z(2)/z(1));-1]
                       z(2)^2 - (4*z(1))*constant];
     [z, ssq, cnt] = LMFnlsq(res,z0); %   see FEX Id 17534
     a = z(1);
     b = z(2);
Hope it helps.
Best regards
Mira