R/linear-spherical-spline.R
normalize.Rd
This function normalizes the rows of the input matrix x by dividing each row by its L2 norm (Euclidean norm).
normalize(x)
Numeric matrix.
Numeric matrix with normalized rows.
normalize(matrix(c(1,2,3,4,5,6), nrow = 2, byrow = TRUE)) #> [,1] [,2] #> [1,] 0.2672612 0.4558423 #> [2,] 0.5345225 0.5698029 #> [3,] 0.8017837 0.6837635