Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: solve command
Date: Wed, 25 Mar 2009 10:32:02 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 23
Message-ID: <gqd172$fp1$1@fred.mathworks.com>
References: <2223808.1237973902862.JavaMail.jakarta@nitrogen.mathforum.org> <29391649.1237975774607.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
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 1237977122 16161 172.30.248.38 (25 Mar 2009 10:32:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 25 Mar 2009 10:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:527523

Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <29391649.1237975774607.JavaMail.jakarta@nitrogen.mathforum.org>...

> 
> As I read in the MATLAB documentation, the backslash
> operation does not seem to produce a least-squares
> solution in the case of square systems if the coefficient
> matrix is singular.
> 
> Instead, you can try
> x = pinv(A*R)*b
> 
> Best wishes
> Torsten.

Hi Torsen,

Yes, the backslash actually produces the least-square solution for overdetermined system (minimizing the norm of the residual, on the image space), as with pinv.

However if the matrix has non-trivial kernel (different {0}), then backslash selects a solution that is usually not  the minimum-norm solution (minimize the norm on the source space, but sill least-square solution). This is the main difference between pinv.

Hope it is clear,

Bruno