Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
function stdM = standardizeMatrix(M)
% STANDARDIZEMATRIX
% Return a standardized version of matrix M where all entries are in range[0,1].
%
% INPUT PARAMS
% Param M (matrix)
% Input matrix that is to be standardized
%
% OUTPUT PARAMS
% Param stdM (matrix)
% Output matrix
%
% ADDITIONAL NOTES
%
% Author: snikumbh@mpi-inf.mpg.de
stdM = zeros(size(M));
mins = repmat(min(M,[],2), 1,size(M,2));
maxs = repmat(max(M,[],2), 1,size(M,2));
stdM = (M - mins)./(maxs - mins);
end