Matlab
chol
compute the Cholesky factorization of a MapleMatrix or MatlabMatrix in MATLAB(R), where R'*R = X, and P is nonzero only if X is positive definite
Calling Sequence
Parameters
Description
Examples
chol(X)
chol(X, output=R)
chol(X, output=RP)
X
-
square MapleMatrix, or MatlabMatrix
output
specify the form of the output (optional)
R
return only unitary Q matrix
RP
return Q and upper decomposed R matrix
The commands Matlab[chol](X) and Matlab[chol](X, 'output'='R') use MATLAB® to compute the Cholesky factorization, R, of a MapleMatrix or MatlabMatrix, where transpose(R)*(R) = X. If X is not positive definite, then an error is returned.
When you specify the optional parameter, output=RP, two values are returned. The second value, P, is zero if X is positive definite; otherwise, P is 1+dimension(R). The first value, R, is the largest dimension matrix such that transpose(R)*(R) = XX, where XX is the upper left corner of X, of dimension P.
For further details on the chol command, see the MATLAB® documentation.
with⁡Matlab:
Define the Maple matrix
a≔Matrix⁡1,0,0,3
a≔1003
Compute the factorization
Matlabchol⁡a
[1. 0. ]
[ ]
[0. 1.73205080756887720]
An example of the RP option
b≔Matrix⁡3,1,3,5,1,6,4,2,6,7,8,1,3,3,7,3
b≔3135164267813373
r,p≔Matlabchol⁡b,output=RP
[1.73205080756887720 0.577350269189625842 1.73205080756887742]
r, p := [ 0. 2.38047614284761665 1.26025207562520891], 4.
[ 0. 0. 1.84709629036559763]
See Also
LinearAlgebra[MatrixInverse]
Matlab[det]
Matlab[evalM]
Matlab[inv]
MatlabMatrix
Download Help Document