MATLAB: Normalizing data

statistics

Hi there,
How would you normalize a column of data in matlab between 0 and 1 using the formula, z = (x-mean)/standard deviation. Is there a built in function to do this?
Many thanks
John

Best Answer

Dear John,
Lets say you have matrix D and you want to normalize each value of Column to unit length (between 0-1). One possible way is :
D = bsxfun(@rdivide,D,sum(D));
each column will be unit normalized. If you take the sum of each column it will be one.
sum(D)
Do let me know if I understand you correct.