IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
adjust_unitnorm.m
Go to the documentation of this file.
1 %> @ingroup maths
2 %> @file
3 %> @brief Normalizes column vectors to unit norm
4 
5 %> @param L Loadings matrix
6 %> @return @em L Adjusted Loadings matrix
7 function L = adjust_unitnorm(L)
8 for i = 1:size(L, 2)
9  v = L(:, i);
10  v = v/norm(v);
11  L(:, i) = v;
12 end;
13 
function adjust_unitnorm(in L)