Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


PEIP (version 2.2-5)

ginv: Get inverse

Description

Get inverse of matrisx or solve Ax=b.

Usage

ginv(G, x, tol = 1e-12)

Value

inverse as a N by 1 matrix.

Arguments

G

Design Matrix

x

right hand side

tol

tolerance

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

This function used as alternative to matlab code that does this h = G\x to get the inverse

See Also

solve, Ainv

Examples

Run this code
set.seed(2015)
GAB = matrix(runif(36), ncol=6)
truex =rnorm(ncol(GAB))
rhs = GAB %*% truex

rhs = as.vector(rhs )

tout = ginv(GAB, rhs, tol = 1e-12)
tout - truex 

Run the code above in your browser using DataLab