Returns the L2 norm of X.
If DIM is absent, the result is scalar.
If DIM is present, it reduces the array in that dimension with the NORM2 operation; the result has the shape of X with dimension DIM omitted.
If no elements are selected for a set of NORM2 operations, the result is zero.
The L2 norm is the square root of the sum of the squares of the elements, computed without undue overflow or underflow.
Note that if X is a 2-element vector, this is essentially the same as HYPOT(X(1),X(2)).