clear;
close all;
load clustdata.mat;

X=X1;
for k=2:5
  y = kmeans(X,k);
  plotclust(X,y);
  refresh;
  eval(sprintf('print -depsc hw5prob3_1_X%d_%d.eps',1,k));
end

X=X2;
for k=2:5
  y = kmeans(X,k);
  plotclust(X,y);
  refresh;
  eval(sprintf('print -depsc hw5prob3_1_X%d_%d.eps',2,k));
end

X=X3;
for k=2:5
  y = kmeans(X,k);
  plotclust(X,y);
  refresh;
  eval(sprintf('print -depsc hw5prob3_1_X%d_%d.eps',3,k));
end
