|
Contents | Previous | Next | Subchapters |
| Syntax |
cholesky(B) |
[C, p] = cholesky(B) | |
| See Also | svd , eigen , qred |
H
C C = B
where B is a real, double-precision, or complex
conjugate symmetric
matrix
and the superscript H denotes the
complex conjugate transpose.
The return value has the same type as B.
The matrix B is positive definite if
H
x B x > 0
whenever x is a nonzero column vector with
row dimension equal to the column dimension of B.
If the argument p is not present
and the matrix B is not positive definite,
and error message will result.
If the argument p is present
and the matrix B is positive definite,
p is the integer scalar zero.
Otherwise, p is the smallest integer scalar such that
B(1::p, 1::p)
is not positive definite.
In this case the return value C is a Cholesky factor for
the upper left (p-1) by (p-1) block of B.
B = {[2., 1.], [1., 2.]}
cholesky(B)
returns
{
[ 1.41421 , 0.707107 ]
[ 0 , 1.22474 ]
}
chol instead of cholesky.
If you continue the example above by entering
mlmode
chol(B)
O-Matrix will respond
{
[ 1.41421 , 0.707107 ]
[ 0 , 1.22474 ]
}
You can return to O-Matrix mode by entering
omatrix