From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Quadratic Cost Function x^T Q x
Date: Thu, 20 May 2010 22:07:05 +0000 (UTC)
Organization: Imperial College London
Lines: 32
Message-ID: <ht4bq9$4t9$>
References: <ht3lnt$92i$> <ht3oj8$gpr$> <ht3tl0$mbi$> <ht3vtl$o1d$> <ht41ak$at$> <ht42pg$8he$> <ht495s$eq2$> <ht4al2$jcc$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1274393225 5033 (20 May 2010 22:07:05 GMT)
NNTP-Posting-Date: Thu, 20 May 2010 22:07:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1192337
Xref: comp.soft-sys.matlab:637828

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <ht4al2$jcc$>...
> "Jason" <> wrote in message <ht495s$eq2$>...
> > "Roger Stafford" <> wrote in message 
> > Think of the vector x as a line in geometrical 2-D space. I want to estimate the parameters of this line, i.e. x(1)*x + x(2)*y + x(3).
> >
> > Pardon my ignorance, but even without placing any constraints on x you get a non-trivial solution (i.e. not x = 0).
> ===============
> But the cost function for this estimation problem bears no resemblance to the one you posed.
> > 
> > My main question is if I can use something different than lsqnonlin which takes a very long time to run and is prone to fall into suboptimal minima.
> =================
> You might try running lsqnonlin with the Algorithm option to 'levenberg-marquardt'. My intuition about the default trust-region method is that, even if you initialize in the correct capture basin, the algorithm can crawl out of it into something less optimal. Conversely, Levenberg-Marquardt is, according to my intuition, may be more basin-preserving. Also, if you supply an analytical gradient then, according to doc lsqnonlin, it could be more computationally cheap per iteration. 
> All of this assumes that you have at least a reasonable guess of the initial solution, but there's no escaping that when it comes to non-convex minimization.

I will try the levenberg-marquardt option, thanks!

As for your inquiry, what do you mean?

The cost function is still the same.

As I said J = min x ( x' Q x).

I am following a principle from computer vision where Q is the matrix representation of a conic (an ellipse). If you set Q = adj(Q) (where adj means adjoint) then x' Q x = 0 means that if this equation is satisfied, then the line parametrized by x is tangent to the ellipse. The additional constraint i have gaven, namely that x(1) and x(2) lie on a unit circle only helps but is not necessary.