rank

Return rank of a rectangular matrix (computed with singular values)

Information

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

Syntax

result = Matrices.rank(A);
result = Matrices.rank(A,eps=0);

Description

This function returns the rank of a square or rectangular matrix A computed by singular value decomposition. For details about the rank of a matrix, see http://en.wikipedia.org/wiki/Matrix_rank. To be more precise:

  • rank(A) returns the number of singular values of A that are larger than max(size(A))*norm(A)*Modelica.Constants.eps.
  • rank(A, eps) returns the number of singular values of A that are larger than "eps".

See also

Matrices.rcond.

Syntax

result = rank(A, eps)

Inputs (2)

A

Type: Real[:,:]

Description: Matrix

eps

Default Value: 0

Type: Real

Description: If eps > 0, the singular values are checked against eps; otherwise eps=max(size(A))*norm(A)*Modelica.Constants.eps is used

Outputs (1)

result

Type: Integer

Description: Rank of matrix A