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