\input texinfo @deftypefn {Loadable Function} {@var{x} =} inv (@var{A}) @deftypefnx {Loadable Function} {[@var{x}, @var{rcond}] =} inv (@var{A}) Compute the inverse of the square matrix @var{A}. Return an estimate of the reciprocal condition number if requested, otherwise warn of an ill-conditioned matrix if the reciprocal condition number is small. In general it is best to avoid calculating the inverse of a matrix directly. For example, it is both faster and more accurate to solve systems of equations (@var{A}*@math{x} = @math{b}) with @code{@var{y} = @var{A} \ @math{b}}, rather than @code{@var{y} = inv (@var{A}) * @math{b}}. If called with a sparse matrix, then in general @var{x} will be a full matrix requiring significantly more storage. Avoid forming the inverse of a sparse matrix if possible. See also: ldivide, rdivide @end deftypefn @bye