Date: Nov 24, 2012 3:58 PM
Author: Eric
Subject: Reconstruct Signal using Retained PCs

Hi,

I am using Matlab's princomp function to perform a PCA on some joint angle data. I will probably retaining 3-5 PC's depending on the joint rotation of interest. For my statistical testing, I am going to compare PC-scores for a retained PC between groups. However, I would like to present visually the data by plotting the reconstructed signal (of the first three retained PCs) against the original signal. Right now I am using princomp to determine the PC-scores. I am also using pcares to get the reconstructed signal although I am wondering if this is redundant?

I know to reconstruct a signal you need to multiple the PC-score matrix by the transpose of the coefficient matrix. However, since the data has been centered by princomp I'm not sure how to get back to the original signal? Pcares seems to take care of this but its not entirely clear if how it is doing this and is there a way to compute the PC-scores, eigenvalues and eigenvectors with pcares or do I need to use princomp as well?

%Code
aggregate = xlsread(filepath); %assign jt angle data name (24 (subjects) x 101 (data points))
[coeff,score,eigval] = princomp(aggregate); %perform PCA
ndim=1;% use the first PC to reconstruct original joint angle signal? I believe this is what ndim is doing
[residuals,reconstructed] = pcares(aggregate,ndim);

Thanks,

Eric