Learn R Programming

IRTpp (version 0.2.6.1)

normalize: Normalize a vector

Description

Normalize a set of vectors contained in a matrix, the vectors are the rows of the matrix. A simple vector is possible using the metric space (R^n,Sigma)

Usage

normalize(x)

Arguments

x
The vector to normalize

Examples

Run this code
## Normalize a matrix
# z <- matrix(rnorm(100, 10, 3), nrow=4)
# normalize(z)
## Normalize a vector
# y <- rnorm(20, 5, 2)
# normalize(y)

Run the code above in your browser using DataLab