det

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

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

Syntax

result = det(A)

Inputs (1)

A

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

Outputs (1)

result

Type: Real

Description: Determinant of matrix A