.. highlightlang:: us .. index:: norm .. _norm: norm ==== .. us.tag norm ENGLISH math-lin-alg :ref:`norm` calculates various matrix norms. .. function:: rsNorm = norm(m) rsNorm = norm(m, ssType) .. us.return **Return Value** *rsNorm* is the matrix norm. .. us.params **Parameters** .. uparam:: m is a real or complex matrix. .. uparam:: ssType is an option string that sets the matrix norm. It can have one of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - ``"1"`` - 1-Norm (maximum column sum). * - ``"2"`` - 2-Norm (maximum singular value). * - ``"I"`` oder "Inf" - Infinit Norm (maximum row sum). * - ``"F"`` oder "Frob" - Frobenius-Norm (Square root of the sum of the aquare of the matrix elements). * - ``"M"`` oder "Max" - Maximum-Norm (maximum of the absolute value). .. us.comment **Comment** *ssType* is not case sensitive. .. us.example **Example** :: * a = [1,2,3;4,5,6;7,8,9] * a 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 * // Calculate various * // Matrix Norms: * norm(a) 18.0000 * norm(a, "1") // 1-Norm 18.0000 * max(sum(abs(a))) 18.0000 * norm(a, "2") // 2-Norm 16.8481 * norm(a, "Inf") // Infinit-Norm 24.0000 * max(sum(abs(a'))) 24.0000 * norm(a, "Frob") // Frobenius-Norm 16.8819 * sqrt(sum(sum(a.*a))) 16.8819 * norm(a, "m") // Maximum-Norm 9.0000 * max(max(abs(a))) 9.0000 .. seealso:: :ref:`cond` :sub:`id-796612`