CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

MathUtilities.norm4

Euclidean norm of a 4-vector

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
inputvalueReal[4]
outputresultReal

Modelica declarations and implementation

Show parameters, interfaces and source

Parameters, inputs, outputs, defaults and equations from the source file.

function norm4 "Euclidean norm of a 4-vector"
  input Real value[4];
  output Real result;
algorithm
  result := sqrt(value * value);
  annotation(Inline=true);
end norm4;