MATLAB: What does normc function do

matlab function

Hi
Can someone tell me what does normc function do? Well … it normalizes data in each column but to what range ([0,1]?) ? I read the description but I can't fully understand.
Thanks.

Best Answer

It normalises the sum of the squares of the elements in each column to have a value of 1.
To illustrate:
M = randi(20,5,5); % Create Random Matrix
Mnc = normc(M); % Call ‘normc’
Ssq = sum(Mnc.^2); % Column Sum-Of-Squares