[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MATLAB COMPATIBILITY (sparse matrices)
From: |
Andy Adler |
Subject: |
Re: MATLAB COMPATIBILITY (sparse matrices) |
Date: |
Fri, 23 Jan 1998 21:00:02 -0700 (MST) |
Thanks to all who sent me references for sparse
matrix textbooks. I've borrowed them from the local library,
and (if all goes well) I might read them, and maybe even
write some code.
I'll contribute two sparce inverse functions I've already
written.
octave:1> help diag_inv
[...] = diag_inv (...)
solve a symetric sparse matrix system with LDL' factorization
X=diag_inv(A,B)
A is mxt where t+1 is number of non-zero superdiagonals
B is mxn
X is mxn
octave:2> help chol_inv
[...] = chol_inv (...)
solve a positive definite sparse matrix system with
cholesky factorization
X=chol_inv(A,B)
A is mxt where t+1 is number of non-zero superdiagonals
B is mxn
X is mxn
if A would be ! 11000 ! then A= ! 11 !
! 14300 ! ! 43 !
! 03520 ! ! 52 !
! 00285 ! ! 85 !
! 00059 ! ! 90 !
They have several limitations.
1) Can only handle real matrices
2) They don't seriously check the well conditioning of
the matrices.
3) I haven't written anything for non-symetric A
4) It should be written as a generalized matrix inverse
routine, which first tries a cholesky factorization,
and, if A is not positive-definite, it goes on
to try LDL' and then something non-symetric.
5) It can't do any row-reordering.
If you'd like to use them they're available at
ftp://d201.njc.org/pub/octave/utils
11524 Jan 23 20:46 chol_inv-linux-i386.oct*
2400 Jan 23 20:44 chol_inv.cc
11708 Jan 23 20:46 diag_inv-linux-i386.oct*
2741 Jan 23 20:44 diag_inv.cc
Any advice or bug reports welcome.
_____________________________________________________________________
Andy Adler, | Pulmonary Physiology Unit | Lab 303-398-1626
address@hidden | National Jewish Center,Denver,USA | Fax 303-398-1607
Welcome to 1998, the triple year of the beast! (3*666=1998)