Version:

Computes the norm of a vector or matrix.

## Syntax

k = norm(a)
k = norm(a, type)

## a

Vector or matrix of double-precision, floating-point or complex double-precision, floating-point numbers.

## type

Norm type. type is a scalar or string. type accepts the following values.

 1 Computes the 1-norm, if a is a matrix. 2 (default) Computes the Euclidean norm, if a is a matrix. inf Computes the max-norm, if a is a matrix. 'fro' Computes the Frobenius norm, if a is a matrix. k Computes the k-norm, if a is a vector. k is a positive integer. The default value is 2. inf Computes the maximum absolute value of a if a is a vector. -inf Computes the minimum absolute value of a if a is a vector.

## k

Norm type of a.