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 never be used, because there are nearly always better numerical algorithms as by computing the determinant. Examples:

  • Use Matrices.rank to compute whether det(A) = 0 (i.e., Matrices.rank(A) < size(A,1)).
  • Use Matrices.solve to solve the linear equation A*x = b, instead of using determinants to compute the solution.

See also

Matrices.rank, Matrices.solve

Inputs

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

Outputs

TypeNameDefaultDescription
RealresultDeterminant of matrix A