Path: news.mathworks.com!not-for-mail
From: "Santiago Mazuelas" <mazuyo@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: linear regression with a nonlinear constraint
Date: Wed, 12 Mar 2008 09:33:01 +0000 (UTC)
Organization: Universidad de Valladolid
Lines: 42
Message-ID: <fr880d$c43$1@fred.mathworks.com>
References: <fr6t5q$648$1@fred.mathworks.com> <fr7smj$ql9$1@fred.mathworks.com>
Reply-To: "Santiago Mazuelas" <mazuyo@hotmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205314381 12419 172.30.248.38 (12 Mar 2008 09:33:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 12 Mar 2008 09:33:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1312314
Xref: news.mathworks.com comp.soft-sys.matlab:456730



"Miroslav Balda" <balda.nospam@cdm.it.cas.cz> wrote in 
message <fr7smj$ql9$1@fred.mathworks.com>...
> "Santiago Mazuelas" <mazuyo@hotmail.com> wrote in message
> <fr6t5q$648$1@fred.mathworks.com>...
> > I have a linear regression problem in which the 
variables 
> > X,Y,Z are related by
> >  
> > Z=aX+bY+c
> > 
> > but a I have the nonlinear constraint c=a^2+b^2
> > 
> > Anybody can tell me how to solve this problem? 
> 
> Hi
> 
> Try function LMFnlsq
> 
> 
http://www.mathworks.com/matlabcentral/fileexchange/loadFile
.do?objectId=17534&objectType=FILE
> 
> to obtain least squares solution by calling
> 
> res = @(ab) X*ab(1)+Y*ab(2)+ab(1)^2+ab(2)^2-Z; 
> x = LMFnlsq(res,x0);
> 
> where x0 is the inoitial guess of the solution, x(1)=a  
and
> x(2)=b.
> 
> I hope it helps.
> 
> Mira
> 
> 
> 

Ok but I want a solution that do not need a initial guess. 
I realize that my problem is non linear indeed, but maybe 
not too much non linear..