Centering Each Column of a matrix to its mean

This function centers each column of a matrix to its mean.
348 Downloads
Updated 27 Apr 2011

View License

Let the input to this function be X, an m x n matrix. Also, let Y be the output. This function does the following.

Y(:,i) = X(:,i) - mean(X(:,i)), for i = 1 to n

Cite As

B H Sri Hari (2024). Centering Each Column of a matrix to its mean (https://www.mathworks.com/matlabcentral/fileexchange/31212-centering-each-column-of-a-matrix-to-its-mean), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Engines & Motors in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0