Return the Frobenius norm of a matrix
function frobeniusNorm extends Modelica.Icons.Function; input Real A[:, :] "Input matrix"; output Real result = if min(size(A)) > 0 then sqrt(sum(A.*A)) else -1e100 "frobenius norm of matrix A"; end frobeniusNorm;
Date | Author | Comment |
---|---|---|
2010-05-31 | Marcus Baur, DLR-RM | Realization |