View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
sparseinv: sparse inverse subset

  • sparseinvSPARSEINV computes the sparse inverse subset of a real sparse square matrix A.
  • sparseinv_installSPARSEINV_INSTALL compiles and installs the sparseinv function.
  • sparseinv_testSPARSEINV_TEST tests the sparseinv function.
  • Contents.mSPARSEINV The sparseinv function computes the sparse inverse subset of a
  • View all files
5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 9 KB File ID: #33966 Version: 1.2

sparseinv: sparse inverse subset


Tim Davis (view profile)


28 Nov 2011 (Updated )

Computes a subset of inv(A) for a real sparse matrix A, using Takahashi's equations.

| Watch this File

File Information

inv(A) is often abused by MATLAB users, but there are times when you need to compute selected entries of inv(A).
The sparseinv function computes the sparse inverse subset of a sparse matrix A. These entries in the inverse subset correspond to nonzero entries in the factorization of A. They can be computed without computing all of the entries in inv(A), so this method is much faster and takes much less memory than inv(A). If A is symmetric and positive definite, then all entries of the diagonal of inv(A) are computed (as well as many off-diagonal terms). This version is restricted to real sparse matrices. A complex version is left for future work.

Example (err will be small):

    load west0479
    A = west0479 ;
    [Z, Zpattern] = sparseinv (A) ;
    S = inv (A) ;
    err = norm (Zpattern .* (Z - S), 1) / norm (S, 1)

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
10 Jan 2014 Gabriel Agamennoni

Great submission! It's (almost) exactly what I was looking for. Is there a way to perform low-rank updates of the inverse subset (e.g. like cholupdate)?

09 Jul 2013 1.1

minor fix to sparseinv.m for sparse symmetric positive definite matrices.

20 Nov 2014 1.2

Converted to a toolbox.

Contact us