clear all
close all
load TRAINLPC
s=[];
for i=1:1:3
    s=[s size(TRAINLPC{i},1)];
end
mx=min(s);
DATA=[];
for i=1:1:3
    DATA=[DATA TRAINLPC{i}(1:1:mx,:)];
end
load TESTLPC
for i=1:1:3
    DATA=[DATA TESTLPC{i}(1:1:mx,:)];
end
[E,D]=eig(cov(DATA'));
temp=diag(D);
plot(temp(length(temp):-1:1))
PROJ1D=E(:,182)'*DATA;
figure
subplot(1,3,1)
plot(PROJ1D,zeros(1,length(PROJ1D)),'*')
PROJ2D=E(:,182:-1:181)'*DATA;
subplot(1,3,2)
plot(PROJ2D(1,:),PROJ2D(2,:),'*')
PROJ3D=E(:,182:-1:180)'*DATA;
subplot(1,3,3)
plot3(PROJ3D(1,:),PROJ3D(2,:),PROJ3D(3,:),'*')