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 21:47:14 +0000 (UTC) Organization: Xoran Technologies Lines: 18 Message-ID: <ht4al2$jcc$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> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1274392034 19852 172.30.248.35 (20 May 2010 21:47:14 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 20 May 2010 21:47:14 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1440443 Xref: news.mathworks.com comp.soft-sys.matlab:637824 "Jason" <jf203@ic.ac.uk> wrote in message <ht495s$eq2$1@fred.mathworks.com>... > "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> 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.