solve_svd: Pseudoinverse of a square matrix

Description Usage Arguments Value Author(s) Examples

View source: R/solve_svd.R

Description

[Stable]

This function computes the Moore-Penrose pseudoinverse of a square matrix using singular value decomposition.

Usage

1
solve_svd(x, tolerance = 2.220446e-16)

Arguments

x

A square matrix

tolerance

The tolerance to consider an eigenvalue equals to zero.

Value

A matrix with the same dimension of x.

Author(s)

Tiago Olivoto, tiagoolivoto@gmail.com

Examples

1
2
3
4
library(metan)
mat <- matrix(c(1, 4, 2, 8), ncol = 2)
det(mat)
solve_svd(mat)

metan documentation built on Nov. 10, 2021, 9:11 a.m.