functionnorm

Return the p-norm of a matrix

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

Matrices.norm(A);
Matrices.norm(A, p=2);

Description

The function call "Matrices.norm(A)" returns the 2-norm of matrix A, i.e., the largest singular value of A.
The function call "Matrices.norm(A, p)" returns the p-norm of matrix A. The only allowed values for p are

  • "p=1": the largest column sum of A
  • "p=2": the largest singular value of A
  • "p=Modelica.Constants.inf": the largest row sum of A

Note, for any matrices A1, A2 the following inequality holds:

Matrices.norm(A1+A2,p) ≤ Matrices.norm(A1,p) + Matrices.norm(A2,p)

Note, for any matrix A and vector v the following inequality holds:

Vectors.norm(A*v,p) ≤ Matrices.norm(A,p)*Vectors.norm(A,p)

See also

Matrices.frobeniusNorm

Inputs

TypeNameDefaultDescription
Real[:,:]AInput matrix
Realp2Type of p-norm (only allowed: 1, 2 or Modelica.Constants.inf)

Outputs

TypeNameDefaultDescription
Realresult0.0p-norm of matrix A