powered by
Computes the Moore Penrose inverse of a matrix
mpinv(M,eps=1e-13)
a matrix
real precision
The Moore-Penrose inverse of M
M
Chapter 10 (Basic Mathematics: Matrix Operations, Integration, and Optimization) from the book: The R Software, Fundamentals of Programming and Statistical Analysis
# NOT RUN { A <- matrix(c(2,3,5,4),nrow=2,ncol=2) solve(A) mpinv(A) B <- matrix(c(4,2,8,4),nrow=2,ncol=2) # solve(B) # gives an error. mpinv(B) # }
Run the code above in your browser using DataLab