powered by
normalize(x)
t(normalize(t(x)))
x <- matrix(rnorm(30),nrow=6) normalize(x) t(normalize(t(x))) # normalize the *rows* of x
Run the code above in your browser using DataLab