Z = zscore(X)
Z = zscore(X, flag)
Z = zscore(X, flag, dim)
Z = zscore(X, flag, vecdim)
Z = zscore(X, flag, 'all')
[Z, mu, sigma] = zscore(...)
zscore centers and scales numeric data by subtracting the mean and dividing by the standard deviation.
flag is 0 for sample standard deviation and 1 for population standard deviation. Samples containing NaN return NaN z-scores. Constant samples return zero z-scores.
X = [1 2 3; 4 5 6];
[Z, mu, sigma] = zscore(X, 0, 1)
| Version | Description |
|---|---|
| 2.0.0 | initial version |