.Modelica_LinearSystems2.Math.Matrices.conditionNumber

Information

Syntax

r = Matrices.conditionNumber(A);

Description

This function calculates the 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 to A.

Example

  A = [1, 2
       2, 1];
  r = conditionNumber(A);

results in:

  r = 3.0

See also

Matrices.rcond

Interface

function conditionNumber
  extends Modelica.Icons.Function;
  input Real A[:, :] "Input matrix";
  input Real p(min = 1) = 2 "Type of p-norm (only allowed: 1, 2 or Modelica.Constants.inf)";
  output Real result = 0.0 "p-norm of matrix A";
end conditionNumber;

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos