Learn R Programming

sSDR (version 1.2.0)

norm1: Normalize a vector

Description

Normalize a vector

Usage

norm1(v)

Arguments

v
A vector.

Value

A vector with norm 1.

Details

This function normalizes any non-zero vector and returns a vector with the norm equal to 1.

Examples

Run this code
data <- gen.data(n=100)
y.norm1 <- norm1(data$y)

Run the code above in your browser using DataLab