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
|
|
chol(X)
chol(X, output=R)
chol(X, output=RP)
|
|
Parameters
|
|
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
|
|
|
|
|
Description
|
|
•
|
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, , 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.
|
|
|
Examples
|
|
>
|
|
Define the Maple matrix
>
|
|
| (1) |
Compute the factorization
>
|
|
[1. 0. ]
|
[ ]
|
[0. 1.73205080756887720]
|
|
|
An example of the RP option
>
|
|
| (2) |
>
|
|
[1.73205080756887720 0.577350269189625842 1.73205080756887742]
|
[ ]
|
r, p := [ 0. 2.38047614284761665 1.26025207562520891], 4.
|
[ ]
|
[ 0. 0. 1.84709629036559763]
|
|
|
|
|
Download Help Document
Was this information helpful?