RUNPCA Perform principal component analysis (PCA) using singular value decomposition (SVD) using Matlab svd() or svds() >> inv(eigvec)*data = pc;

Usage: >> [pc,eigvec,sv] = runpca(data);
>> [pc,eigvec,sv] = runpca(data,num,norm)

Inputs:
data   
input data matrix (rows are variables, columns observations)
num   
number of principal comps to return {def|0|[] -> rows in data}
norm   
1/0 = do/don't normalize the eigvec's to be equivariant {def|0 -> no normalization}

Outputs:
pc   
the principal components, i.e. >> inv(eigvec)*data = pc;
eigvec   
the inverse weight matrix (=eigenvectors). >> data = eigvec*pc;
sv   
the singular values (=eigenvalues)

Author: Colin Humphries, CNL / Salk Institute, 1997

See also: runica

See the matlab file runpca.m (may require other functions)

Back to functions