Skip to content

vecnorm

linear-algebra · scripts/linear-algebra/vecnorm.m

: n = vecnorm (A)
: n = vecnorm (A, p)
: n = vecnorm (A, p, dim)

Vector-wise p-norms of an array.

The norm is taken along dimension dim (default: the first non-singleton dimension); p defaults to 2 and may be any positive real number or Inf. Intermediate over- and underflow is avoided.

Matching MATLAB R2026a, A must be single or double (sparse allowed).