From: "Miroslav Balda" <>
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$>
References: <glst9p$dql$>
Reply-To: "Miroslav Balda" <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1233264722 25302 (29 Jan 2009 21:32:02 GMT)
NNTP-Posting-Date: Thu, 29 Jan 2009 21:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 360709
Xref: comp.soft-sys.matlab:514833

"AJ Smith" <> wrote in message <glst9p$dql$>...
> 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

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