%
% Script file: pca8OX.m
% Principal Component Projection for data8OX.txt
%
fin=fopen('data8OX.txt');
d=8; N=45;                % d features, N patterns
fgetL(fin);                 % skip line 1
fgetL(fin);                 % skip line 2
fgetL(fin);                 % skip line 3
A=fscanf(fin,'%f',[d+1 N]);   % read input data 
A=A';
X=A(:,1:d);
k=2;
Y=PCA(X,2);
X1=Y(1:15,1); Y1=Y(1:15,2);
X2=Y(16:30,1); Y2=Y(16:30,2);
X3=Y(31:45,1); Y3=Y(31:45,2);
plot(X1,Y1,'^',X2,Y2,'O',X3,Y3,'X');  axis([2 24 -2 20]); grid;