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$>
References: <> <>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1237977122 16161 (25 Mar 2009 10:32:02 GMT)
NNTP-Posting-Date: Wed, 25 Mar 2009 10:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:527523

Torsten Hennig <> wrote in message <>...

> 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,