Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
PCA Function
% Find score matrix for PCA %
% Outputs score between column s and e %
function W = PCA(matrix, s, e)
[U,S,V] = svd(matrix * transpose(matrix));
T = U * sqrt(S);
T = W(:,s:e);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment