.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-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos