Global Index (short | long) | Local contents | Local Index (short | long)
y = standardize ( x )
function y = standardize ( x ) standardize a vector or a matrix (each column is normalized)
This function is called by | |
---|---|
function y = standardize ( x ) ndim = ndims(x); nsz = size(x); if ndim > 2; x = reshape(x, nsz(1), prod(nsz(2:ndim))); end [m,n]=size(x); if(m==1) m=n; end y = ( x - ones(m,1)*mean(x) ) ./ ( ones(m,1)*std(x) ); y = reshape(y, nsz);