Navigation

Operators and Keywords

Function List:

C++ API

: center (x)
: center (x, dim)

Center data by subtracting its mean.

If x is a vector, subtract its mean.

If x is a matrix, do the above for each column.

If the optional argument dim is given, operate along this dimension.

Programming Note: center has obvious application for normalizing statistical data. It is also useful for improving the precision of general numerical calculations. Whenever there is a large value that is common to a batch of data, the mean can be subtracted off, the calculation performed, and then the mean added back to obtain the final answer.

See also: zscore.

Package: octave