QR takes as argument a numeric square matrix A of size
n and two variable names, var1 and var2.
QR factorizes this matrix numerically as Q*R where Q is an orthogonal matrix (tQ*Q=I) and R is an upper triangular matrix. QR(A,var1,var2) returns R, stores Q=A*inv(R) in var1 and R in var2.
Output the matrix R :
Then input :
Output the matrix Q :