powered by
QR decomposition solution to Ax=b
Ainv(GAB, x, tol = 1e-12)
Inverse Solution
design matrix
right hand side
tolerance for singularity
Jonathan M. Lees<jonathan.lees@unc.edu>
I needed something to make up for the lame-o matlab code that does this h = G\x to get the inverse
set.seed(2015) GAB = matrix(runif(36), ncol=6) truex =rnorm(ncol(GAB)) rhs = GAB %*% truex rhs = as.vector(rhs ) tout = Ainv(GAB, rhs, tol = 1e-12) tout - truex
Run the code above in your browser using DataLab