FUNCTION REFERENCE
inv
Matrix inverse.
Matrix inverse.
Syntax
inv(A)For a SISO LTI model, inv(sys) constructs its reciprocal and preserves the
representation. A zero model is rejected. An ss reciprocal requires nonzero
direct feedthrough so that the result has an ordinary proper realization.
Returns the inverse of a square matrix. A singular matrix is an error. For solving A*x = b use A\b.
Example
inv([2 0; 0 4]) % [0.5 0; 0 0.25]Differences from MATLAB: real input must be double with finite values, and a singular real matrix raises an error, not a warning. Complex double input works as in MATLAB: a singular matrix warns "Matrix is singular to working precision." and gives Inf, an ill-conditioned one warns with its RCOND estimate.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.