norm()

Read(29) Label: matrix, vector, normalize,

Description:

Normalize a matrix or a vector.

Syntax:

norm(A)

Note:

The function normalizes a matrix or a vector by subtracting the mean from each element of every row and then dividing each element by the square root of the sum of squares.

Parameters:

A

A matrix or a vector

Options:

@0

Enable subtracting the mean from each row only without keeping lengths same

Return value:

A sequence

Example:

 

A

 

1

=[2,3,5]

 

2

=norm(A1)

3

=norm@0(A1)