.Modelica.Math.Matrices.frobeniusNorm

Information

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

Interface

function frobeniusNorm
  extends Modelica.Icons.Function;
  input Real A[:, :] "Input matrix";
  output Real result "Frobenius norm of matrix A";
end frobeniusNorm;

Revisions


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