set.seed(2)
A<-matrix(c(complex(real=1,imaginary = 1),
complex(real=3,imaginary = -2), complex(real=2,imaginary = 1),
complex(real=0,imaginary = 3)),2,2)
qres<-QRcomp(A)
#Inspect the main results of the factorization:
qres$Q
qres$R
Run the code above in your browser using DataLab