Skip to content

Instantly share code, notes, and snippets.

@erogol
Created September 3, 2013 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erogol/6425147 to your computer and use it in GitHub Desktop.
Save erogol/6425147 to your computer and use it in GitHub Desktop.
Z-score Normalization of data
function[X_norm, mu, sigma] = zscore_normalize_data(X, mu, sigma)
X_norm=bsxfun(@minus,X,mu);
X_norm=bsxfun(@rdivide,X_norm,sigma);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment