%QR     Orthogonal-triangular decomposition.
%   X = QR(A), for dense or sparse matrices A, computes a "Q-less QR
%   decomposition" and returns the upper triangular factor R. If A is full,
%   then R = TRIU(X). If A is sparse, then R = X.
%   
%   [Q,R] = QR(A) performs a QR decomposition on m-by-n matrix A such that
%   A = Q*R. The factor R is an m-by-n upper triangular matrix and Q is an
%   m-by-m unitary matrix.
%
%   [Q,R,P] = QR(A) also returns a permutation matrix P so that A*P = Q*R.
%
%   [___] = QR(A,0) produces an economy-size decomposition using any
%   previous combination of output arguments. The size of the outputs
%   depends on the size of m-by-n matrix A:
%       * m > n: Compute only n columns of Q and n rows of R.
%       * m <= n: Same as the regular decomposition [Q,R] = QR(A).
%   If you specify a third output with the economy-size decomposition, then
%   it is returned as a permutation vector p such that A(:,p) = Q*R.
%
%   [Q,R,P] = QR(A,outputForm) specifies whether to return the permutation
%   information P as a matrix or vector. For example, if outputForm is
%   'vector', then A(:,P) = Q*R. The default value of outputForm is
%   'matrix' such that A*P = Q*R.
%
%   [C,R] = QR(S,B), for sparse matrix S, computes C = Q'*B and the
%   upper-triangular factor R. You can use C and R to compute a
%   least-squares solution to the sparse linear system S*X = B with X =
%   R\C.
%
%   [C,R,P] = QR(S,B) also returns a permutation matrix P. You can use C,
%   R, and P to compute a least-squares soluton to the sparse linear system
%   S*X = B with X = P*(R\C).
%
%   [___] = QR(S,B,0) produces an economy-size decomposition using either
%   of the previous two output argument combinations. The size of the
%   outputs depends on the size of m-by-n sparse matrix S: 
%       * m > n: C and R have only n rows. 
%       * m <= n: Same as the regular decomposition [C,R] = QR(A,B).
%   If you specify a third output with the economy-size decomposition, then
%   it is returned as a permutation vector p such that the least-squares
%   solution to S*X = B is X(p,:) = R\C.
%
%   [C,R,P] = QR(S,B,outputForm) specifies whether to return the
%   permutation information P as a matrix or vector.
%
%   See also LU, NULL, ORTH, QRDELETE, QRINSERT, QRUPDATE.

%   Copyright 1984-2019 The MathWorks, Inc.
%   Built-in function.

