%% Full QR Decomposition of Matrix
% Compute the full QR decomposition of a magic square test matrix by specifying two output arguments.

A = magic(5);
[Q,R] = qr(A)

%
% Verify that A=\textrm{QR}, within machine precision.

norm(A-Q*R)

% Copyright 2019 The MathWorks, Inc.