removes the mean and normalizes the data to a variance of 1.
[z,r,m] = nan_zscore(x,DIM)
data
dimension 1 - STATS of columns 2 - STATS of rows default or []- first DIMENSION, with more than 1 element
z-score of x along dimension DIM
is the inverse of the standard deviation
is the mean of x
Can be used for Pre-Whitening of the data, too.
The data x can be reconstrated with
x = z*diag(1./r) + repmat(m,size(z)./size(m))
z = x*diag(r) - repmat(m.*v,size(z)./size(m))
[1] http://mathworld.wolfram.com/z-Score.html