Learn R Programming

pracma (version 0.2-2)

inv: Matrix Inverse (Matlab Style)

Description

Invert a numeric or complex matrix.

Usage

inv(a)

Arguments

a
real or complex square matrix

Value

  • square matrix that is the inverse of a

Details

Computes the matrix inverse by calling solve(a) and catching the error if the matrix is nearly singular.

See Also

solve

Examples

Run this code
a <- hilb(6)
b <- inv(a)

Run the code above in your browser using DataLab