Ainv | R Documentation |
QR decomposition solution to Ax=b
Ainv(GAB, x, tol = 1e-12)
GAB |
design matrix |
x |
right hand side |
tol |
tolerance for singularity |
I needed something to make up for the lame-o matlab code that does this h = G\x to get the inverse
Inverse Solution
Jonathan M. Lees<jonathan.lees@unc.edu>
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.