[95bb1e]: / SLEP_package_4.1 / Examples / traceNorm / CenterRowData.m

Download this file

7 lines (4 with data), 174 Bytes

1
2
3
4
5
6
function [centered_data,centroid] = CenterRowData(input)
% each row is a data point
centroid = mean(input);
centered_data = input-(ones(size(input, 1), 1)*centroid);