Companion function to pca. Use pca.m to retrieve the principal components U and the mean mu from a set of vectors x, then use pcaApply to get the first k coefficients of x in the space spanned by the columns of U. See pca for general usage. If x is large, pcaApply first splits and processes x in parts. This allows pcaApply to work even for very large arrays. This may prove useful: siz=size(X); k=100; Uim=reshape(U(:,1:k),[siz(1:end-1) k ]); USAGE [ Yk, Xhat, avsq ] = pcaApply( X, U, mu, k ) INPUTS X - data for which to get PCA coefficients U - returned by pca.m mu - returned by pca.m k - number of principal coordinates to approximate X with OUTPUTS Yk - first k coordinates of X in column space of U Xhat - approximation of X corresponding to Yk avsq - measure of squared error normalized to fall between [0,1] EXAMPLE See also PCA, PCAVISUALIZE Piotr's Computer Vision Matlab Toolbox Version 2.0 Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] Licensed under the Simplified BSD License [see external/bsd.txt]

Generated by