To compute the QR factorization of a matrix A, and solve the linear system Qx = b, you can follow these steps in MATLAB:
main.m204 chars9 lines
The output will be approximately:
main.m33 chars4 lines
This means that the solution to the linear system Qx = b is x = [-1; 0; 1].
gistlibby LogSnag