clear all;



%data=[randn(100,2)*.4;randn(100,2)*.5+ones(100,1)*[4 4]];
data=[randn(100,2)*.4;randn(100,2)*.5];

figure(1)
hold on;
scatter(data(:,1),data(:,2),25,'*')
hold off;


[pc, score] = princomp(data);

figure(2)
biplot(pc(:,1:2),'Scores',score(:,1:2),'VarLabels',{'X1' 'X2'})
