Matrix or vector norm
(Quaternion and octonion overloadings of standard MATLAB® function)
Y = norm(X, p)
See the function normq for the quaternion norms of the elements of a matrix - this function computes a matrix norm as does the MATLAB® function of the same name.
norm(X, p) computes the norm of the vector or matrix X. The second parameter selects the type of norm computed. Possible values are 1, 2, inf, -inf, and 'fro'.
If X is a vector the norms computed for each value of p are as follows: 1 - sum of the absolute values; 2 - square root of the sum of squared values; inf - maximum absolute value; -inf - minimum absolute value.
If X is a matrix the norms computed for each value of p are as follows: 1 - sum of the absolute values of the elements of each column; 2 - the largest singular value (requiring a singular value decomposition to be computed); inf - maximum absolute value in each column; 'fro' - the Frobenius norm.