%
% test of k-means clustering algorithm
%
%
a = [1 1;.8 .9; 1.1 .9; 1.5 1.4; 1.5 2.7; ...
                       3 3.5;2.8 3.2;2.9 3.3;2.7 3.5];
%
nc = 2;
[ mm alloc ] = kmeans( a, nc );
figure
plot( a(:,1), a(:,2), '+' );
axis( [ 0.5 3.5 0.5 4.0 ] );
set( gca, 'fontsize', 24 );
xlabel( 'Variable A' );
ylabel( 'Variable B' );
hold on;
plot( mm(:,1), mm(:,2), 'o' );
hold off;
%
print -f1 -deps2 clust1.eps
%

