Path: news.mathworks.com!not-for-mail
From: "Miroslav Balda" <miroslav.nospam@balda.cz>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Nonlinear Least Squares problem
Date: Thu, 29 Jan 2009 21:32:02 +0000 (UTC)
Organization: Miroslav Balda
Lines: 13
Message-ID: <glt78i$omm$1@fred.mathworks.com>
References: <glst9p$dql$1@fred.mathworks.com>
Reply-To: "Miroslav Balda" <miroslav.nospam@balda.cz>
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 1233264722 25302 172.30.248.38 (29 Jan 2009 21:32:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Jan 2009 21:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 360709
Xref: news.mathworks.com comp.soft-sys.matlab:514833

"AJ Smith" <ajsmith_15@hotmail.com> wrote in message <glst9p$dql$1@fred.mathworks.com>...
> I'm working on solving a system of non-linear equations in MATLAB. Currently I am able to solve a system of 3 equations with 3 unknowns using Newton's method (with a jacobian, etc). What I want to do is take 4 or more equations (still with 3 unknowns) and solve them, but when I do, the jacobian is non-square, therefore not invertable (also not compatible with the backslash operation). Does anybody have any ideas on how to go about soving this? Here are my equations, 'i' going from 1 to the number of equations I want. The knowns are a,b,and theta and the unknowns are x, y, and phi.
> 
> 0 = a(i) - x - (b(i) - y)*tan(theta(i) + phi)
> 
> Thanks!
> 
> AJ

Hi,
In this case you may apply my function LMFnlsq (FEX Id 17534), which is ready just for thiese tastks.
Good luck.
Mira