Back to Linear Algebra
norm
Matrix or vector norm
Syntax
n = norm(A) n = norm(A, p) n = norm(A, 'fro')
Description
Computes the norm of a vector or matrix. For vectors, the default is the 2-norm (Euclidean). For matrices, the default is the Frobenius norm. An optional second argument specifies the norm order (1, 2, etc.) or type ('fro' for Frobenius, 'nuc' for nuclear).
Parameters
| Name | Description |
|---|---|
| A | Input vector or matrix |
| p(optional) | Norm order or type: number (1, 2, Inf), or string ('fro', 'nuc') |
Returns
Scalar norm value