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

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

Yes, x is a vector of homogeneous coordinates!

I agree about what you say: "for any solution x, another solution is c*x for any scalar c." I experienced this, but what can I do about it?

I am reading about how to do this using polyfit, I have no idea how to start, since as I said I want to compute the common tangent to a set of ellipses which is solved if x'Qx = 0.

Say I have a set of ellipses in either matrix form, or of course I can write it out as a polynomial, how do I know if the line I am trying to fit is tangent to these ellipses?