FUNCTION REFERENCE

vecnorm

Vector-wise norm of a vector, matrix, or N-D array.

Vector-wise norm of a vector, matrix, or N-D array.

Syntax

n = vecnorm(A)

Syntax

n = vecnorm(A, p)

Syntax

n = vecnorm(A, p, dim)

Computes the p-norm along dimension dim (defaulting to the first non-singleton

dimension). p is a positive real scalar or Inf (default 2). Complex inputs use

element-wise magnitudes |z|.

Example

vecnorm([3 4; 6 8], 2, 2)   % [5; 10]

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.