function [projVar, totalVar, Xp] = calcProjVariance(X, A)
% function [projVar, Xp] = calcProjVariance(X, A)
%
% Dr. A. I. Hanna (2006)
if size(X,1)==1
    C = 0;
else
    C = cov(X);
end
[V, L] = eig(C);
totalVar = trace(L);
Xp = (A*inv(A'*A)*A'*X')';
if size(Xp,1)==1
    C = 0
else
    C = cov(Xp);
end
[V, L] = eig(C);
projVar = trace(L);




