Prev: Requring matlab code to study mobility model
Next: Requring matlab code to study mobility model
From: Li on 9 Jun 2010 11:58 "Rob Gens" <rcg(a)alum.mit.edu> wrote in message <grfata$97m$1(a)fred.mathworks.com>... > > NormalizedArray = (TheArray-mean(TheArray(:))) ./ var(TheArray(:)); > > > > To normalize to 0 mean, subtract off the mean. To normalize to unit variance, divide by > > the variance. The variance is independent of the mean, so there is no need to take > > the variance -after- subtracting the mean: the variance of the original array will be > > identical. > > I'm afraid that is incorrect. You should divide by the standard deviation which is the square root of the variance. > > NormalizedArray = (TheArray-mean(TheArray(:))) ./ sqrt(var(TheArray(:))); This is very helpful. Thanks!
|
Pages: 1 Prev: Requring matlab code to study mobility model Next: Requring matlab code to study mobility model |