mpinv: Moore Penrose inverse

Description Usage Arguments Value Author(s) References Examples

View source: R/mpinv.R

Description

Computes the Moore Penrose inverse of a matrix

Usage

1
mpinv(M,eps=1e-13)

Arguments

M

a matrix

eps

real precision

Value

The Moore-Penrose inverse of M

Author(s)

Lafaye de Micheaux Pierre <lafaye@unsw.edu.au>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <b.liquet@uq.edu.au>

References

Chapter 10 (Basic Mathematics: Matrix Operations, Integration, and Optimization) from the book: The R Software, Fundamentals of Programming and Statistical Analysis

Examples

1
2
3
4
5
6
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)

TRSbook documentation built on May 2, 2019, 2:45 a.m.

Related to mpinv in TRSbook...