# norm

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.

Name Description
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.

A = [1, 2, 3; 4, 5, 6; 7, 8, 9]
C = norm(A, 'fro')

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported