metan (version 1.18.0)

solve_svd: Pseudoinverse of a square matrix

Description

[Stable]

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

Usage

solve_svd(x, tolerance = 2.220446e-16)

Value

A matrix with the same dimension of x.

Arguments

x

A square matrix

tolerance

The tolerance to consider an eigenvalue equals to zero.

Author

Tiago Olivoto, tiagoolivoto@gmail.com

Examples

Run this code
# \donttest{
library(metan)
mat <- matrix(c(1, 4, 2, 8), ncol = 2)
det(mat)
solve_svd(mat)
# }

Run the code above in your browser using DataLab