conditionNumberReturn the condition number norm(A)*norm(inv(A)) of a matrix A |
|
This information is part of the Modelica Standard Library maintained by the Modelica Association.
r = Matrices.conditionNumber(A);
This function calculates the condition number (norm(A) * norm(inv(A))) of a general real matrix A, in either the 1-norm, 2-norm or the infinity-norm. In the case of 2-norm the result is the ratio of the largest to the smallest singular value of A. For more details, see http://en.wikipedia.org/wiki/Condition_number.
A = [1, 2;
2, 1];
r = conditionNumber(A);
results in:
r = 3.0
| A |
Type: Real[:,:] Description: Input matrix |
|---|---|
| p |
Default Value: 2 Type: Real Description: Type of p-norm (only allowed: 1, 2 or Modelica.Constants.inf) |
| result |
Default Value: 0.0 Type: Real Description: Condition number of matrix A |
|---|