Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: inverse matrix inv pinv linfactor ginv
Date: Sun, 4 Oct 2009 14:05:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 32
Message-ID: <haaa2d$61b$1@fred.mathworks.com>
References: <ha8r6f$pf7$1@fred.mathworks.com> <6ed887e5-8dc1-4d0d-8d96-ef4ac3c7b5c7@j19g2000vbp.googlegroups.com>
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 1254665101 6187 172.30.248.38 (4 Oct 2009 14:05:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 4 Oct 2009 14:05:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:574804


Rune Allnor <allnor@tele.ntnu.no> wrote in message <6ed887e5-8dc1-4d0d-8d96-ef4ac3c7b5c7@j19g2000vbp.googlegroups.com>...
> On 4 Okt, 02:45, "leo nidas" <bleonida...@yahoo.gr> wrote:

> 
> PINV does this, with the TOL argument that you
> as user have to provide in advance - I suspect this
> is an absolute tolerance. I would prefer a relative
> tolerance, like
> 

Using PINV has two drawbacks:
1. It call for an expansive SVD
2. It does not work on sparse matrix

That's the reason I wrote a PSEUDOINVERSE on FEX based on QR factorization. Admittedly the factorization will be an expensive strategy for sparse matrix in term of storing space, and it is probably is impossible to apply on large scale problems (such as dimensions > 10e4, and yes there is a TONE of applications that need to solve such large system - forward or backward).

I might complete with an iterative regularized solver soon, even if it's no longer a "pseudo inverse" however both the practical scope of both have large overlapping.

> PINV does this, with the TOL argument that you
> as user have to provide in advance - I suspect this
> is an absolute tolerance.

Correct.

>I would prefer a relative
> tolerance, like
> 
> RTOL = eps('double')*max(diag(S));

No big deal, just pass input TOL as the desired relative tolerance multiplied by norm/normest of the input matrix (which is the largest s(i,i)).

Bruno