= MATLAB norm = The '''`norm`''' function calculates a [[LinearAlgebra/Norm|norm]]. <> ---- == Usage == === Vectors === When operating on vectors, the `norm` function calculates a [[LinearAlgebra/Norm|p-norm]]. To calculate a 2-norm, try: {{{ norm([1 -2 3], 2) }}} As this suggests, the second argument is ''p''. If the second argument is not specified, 2 is assumed. === Matrices === When operating on matrices, the `norm` function dispatches between different norm calculations based on the second argument. To calculate the Frobenius norm, try: {{{ norm([1 2; 3 4], "fro") }}} Other valid values for the second argument are... * `Inf` for the maximum absolute row sum * `1` for the maximum absolute column sum * `2` (also the default) for the maximum [[LinearAlgebra/SingularValues|singular value]] ---- CategoryRicottone