Path: news.mathworks.com!not-for-mail
From: "Petros Mpogiatzis" <painter@geo.auth.gr>
Newsgroups: comp.soft-sys.matlab
Subject: Re: inverse matrix inv pinv linfactor ginv
Date: Sun, 4 Oct 2009 13:45:02 +0000 (UTC)
Organization: Aristotle University of Thessaloniki
Lines: 17
Message-ID: <haa8su$ige$1@fred.mathworks.com>
References: <ha8r6f$pf7$1@fred.mathworks.com> <haa339$1tk$1@fred.mathworks.com> <haa48p$in7$1@fred.mathworks.com>
Reply-To: "Petros Mpogiatzis" <painter@geo.auth.gr>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254663902 18958 172.30.248.35 (4 Oct 2009 13:45:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 4 Oct 2009 13:45:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 465221
Xref: news.mathworks.com comp.soft-sys.matlab:574799


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <haa48p$in7$1@fred.mathworks.com>...
> "Tim Davis" <davis@cise.ufl.edu> wrote in message <haa339$1tk$1@fred.mathworks.com>...
> 
> > And you should never (well, almost never) do x=(A'*A)\(A'*b) to solve a least squares problem. 
> 
> Right, but what you could do is
> 
> x = (A'*A + L'*L) \ (A'*b)
> 
> where L is appropriate Tikhonov matrix. In the standard form L could be sqrt(lambda)*speye(n).
> 
> It is anyway dangerous not using any kind of regularization while solving system involving a ill-conditioned matrix (it is *not* the case of OP's problem, since the problem he had is simply due to a bad scaling).
> 
> Bruno

or redefine your initial system to include the L'L constraint and then to solve the redefined system
x=Aext\bext