RQ decomposition of a rectangular complex matrix without column pivoting (A = R*Q)
function C_RQ import Complex; input Complex A[:, :] "Rectangular matrix with size(A,1) >= size(A,2)"; output Complex R[size(A, 1), size(A, 1)] "Rectangular matrix with orthonormal columns such that Q*R=A[:,p]"; output Complex Q[size(A, 1), size(A, 2)] "Square upper triangular matrix"; end C_RQ;