Matlab[qr] - compute the QR orthogonal-triangular decomposition of a MapleMatrix or MatlabMatrix in MATLAB(R), where X*P = Q*R

Calling Sequence

qr(X, output=R)

qr(X, output=QR)

qr(X, output=QRP)

Parameters

X

-

MapleMatrix or MatlabMatrix

output

-

specify the form of the output (optional)

R

-

return the upper triangular matrix R

QR

-

return unitary matrix Q and upper triangular R matrix

QRP

-

return Q, R, and permutation matrix P

Description

•

The qr command computes the QR orthogonal-triangular decomposition of a matrix (either a Maple matrix or a MatlabMatrix) in MATLAB®. When output=QRP, the result is computed where . When output=QR, the result is computed where .

•

The matrix X can be either square or rectangular.

•

The matrix X is expressed as product of an upper triangular matrix and either a real orthonormal matrix or a complex unitary matrix.

•

The default if no output option is specified is to return the matrices Q and R.

Examples

Define the Maple matrix

>

>

(1)

The QR decomposition of this MapleMatrix is computed and returns Q and R, as follows: