qr function in R and matlab
问题 I have a question about converting a matlab function into R, and I was hoping that someone could help. The standard QR decomposition used in both matlab and R is referred to as qr(). To my understanding, the standard way of performing a qr decomposition in both languages is: Matlab: [Q,R] = qr(A) satisfying QR=A R: z <- qr(A) Q <- qr.Q(z) R <- qr.R(z) Both of which provide me with the same results, unfortunately, this is not what I need. What I need is this: Matlab: [Q,R,e] = qr(A,0) which