Files
linguist/samples/Matlab/normalize.m
2013-10-28 18:02:15 +01:00

7 lines
176 B
Matlab

function [ d, d_mean, d_std ] = normalize( d )
d_mean = mean(d);
d = d - repmat(d_mean, size(d,1), 1);
d_std = std(d);
d = d./ repmat(d_std, size(d,1), 1);
end