Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Quadratic Cost Function x^T Q x
Date: Thu, 20 May 2010 22:56:04 +0000 (UTC)
Organization: Xoran Technologies
Lines: 23
Message-ID: <ht4em4$853$1@fred.mathworks.com>
References: <ht3lnt$92i$1@fred.mathworks.com> <ht3oj8$gpr$1@fred.mathworks.com> <ht3tl0$mbi$1@fred.mathworks.com> <ht3vtl$o1d$1@fred.mathworks.com> <ht41ak$at$1@fred.mathworks.com> <ht42pg$8he$1@fred.mathworks.com> <ht495s$eq2$1@fred.mathworks.com> <ht4al2$jcc$1@fred.mathworks.com> <ht4bq9$4t9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1274396164 8355 172.30.248.38 (20 May 2010 22:56:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 20 May 2010 22:56:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:637847

"Jason" <jf203@ic.ac.uk> wrote in message <ht4bq9$4t9$1@fred.mathworks.com>...

> 
> 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.
=================

You mean x is a vector of homogeneous coordinates!?!

This seems like a really dubious idea. If all this is really just to fit a line, why don't you just use polyfit? It would be much faster and more robust.

At any rate, if you don't constrain homogeneous coordinates in some way, your minimization problem is virtually guaranteed to be ill-conditioned.  In the case of the line

x(1)*X+x(2)*Y+x(3)

for any solution x, another solution is c*x for any scalar c. This tends to create problems for optimization algorithms.