[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Matrices and "type tags"

**From**: |
Mike Miller |

**Subject**: |
Re: Matrices and "type tags" |

**Date**: |
Thu, 9 Dec 1999 11:23:04 -0600 (CST) |

On Thu, 9 Dec 1999, Thomas Hoffmann wrote:
>* The state-of-the-art in Octave is, that we have complex and real*
>* matrix types recognized by the system and handled accordingly, but*
>* that we have to look for the other "special" properties of matrices*
>* ourselves (e.g. one can (wrongly) give a non-symmetric matrix to*
>* chol()).*
Thanks for pointing this out. I never thought about what chol would do
with a square, asymmetric, positive-definite matrix. It is the same in
both Octave and MATLAB:
octave:4> X=rand(3)+eye(3), e= eig(X)
X =
1.49100 0.62694 0.13827
0.13255 1.16509 0.54857 <---clearly asymmetric
0.26631 0.76653 1.91000
e =
1.36335
2.41438 <---clearly positive definite
0.78837
octave:5> chol(X)'*chol(X) - X
ans = <---no error messages
-0.00000 0.00000 0.00000
0.49439 0.00000 0.00000 <---a reasonable solution
-0.12805 -0.21796 0.00000
The lower triangle of the input matrix is ignored in computing the
Cholesky factorization. So I'll be extra careful to have symmetric input!
Regards,
Mike
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------