Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Linear Algebra
See also: qr

Function: qrmat
Description: returns Q and R matrixes from the output of the QR decompisition


Usage: {Q,R} = qrmat(y,aux)
Input:
y n x p matrix. y must be the output of qr(...).
aux p x 1 vector.
Output:
Q n x p matrix. Q is an orthogonal matrix of the QR decomposition.
R p x p matrix. R is an upper triangular matrix of the QR decomposition.

Example:

randomize(123)
x=normal(3,2)
{y,aux,jpvt}=qr(x)
{q,r}=qrmat(y,aux)
x
q
r
q*r      
Result:

Contents of x
[1,]  0.76711  0.23537 
[2,]    1.202  0.42645 
[3,] -0.65857    1.929 
Contents of q
[1,]  -0.4884 -0.21218  0.84643 
[2,] -0.76528 -0.36194 -0.53231 
[3,]   0.4193 -0.90773   0.0144 
Contents of r
[1,]  -1.5706  0.36754 
[2,]        0  -1.9553 
[3,]        0        0 
Contents of _tmp
[1,]  0.76711  0.23537 
[2,]    1.202  0.42645 
[3,] -0.65857    1.929 

Group: Linear Algebra
See also: qr

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(C) MD*TECH Method and Data Technologies, 17.8.2000