frobeniusNorm

Return the Frobenius norm of a matrix

Information

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

Syntax

r = Matrices.frobeniusNorm(A);

Description

This function computes the Frobenius norm of a general real matrix A, i.e., the square root of the sum of the squares of all elements.

Example

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

results in:

r = 3.162;

See also

Matrices.norm

Syntax

result = frobeniusNorm(A)

Inputs (1)

A

Type: Real[:,:]

Description: Input matrix

Outputs (1)

result

Type: Real

Description: Frobenius norm of matrix A