Normalizing columns of a matrix
Show older comments
Hello everyone,
I have a matrix of, let's say 10000x10000 size, and I want to normalize each column of the matrix by its respective norm (let's say ith column divided norm of ith column) and also store the respective norms in another vector (so there'll be a vector of size 10000x1 where each row will correspond to norm of respective column). This is of course achievable by using a for loop but I need to know if there's any optimum way or a function that would do it for me quickly.
Thanks.
Accepted Answer
More Answers (1)
Julia Gala
on 4 Dec 2017
Check:
normc
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!