functiondet

Return determinant of a matrix (computed by LU decomposition; try to avoid det(..))

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

result = Matrices.det(A);

Description

This function returns the determinant "result" of matrix A computed by a LU decomposition with row pivoting. For details about determinants, see http://en.wikipedia.org/wiki/Determinant. Usually, this function should not be used, because there are nearly always better numerical algorithms than computing the determinant. Examples:

  • Use Matrices.solve to solve the linear equation A*x = b.
  • Use Matrices.rcond(A)>=epsilon to check that the system is well-conditioned and not singular.

See also

Matrices.rank, Matrices.solve

Inputs

TypeNameDefaultDescription
Real[:,size(A, 1)]A

Outputs

TypeNameDefaultDescription
RealresultDeterminant of matrix A