clear
NC = 2; m = 2; eps = 0.001;

[xx,yy]=meshgrid(-1:0.02:1, -1:0.02:1);
fm1 = xx;

% make data
%randn('seed',0);
d(:,1) = [-.5+0.2*randn(50,1); 0.5+0.2*randn(50,1)];
d(:,2) = [-.5+0.2*randn(50,1); 0.5+0.05*randn(50,1)];
load fcmex

figure(1); clf; plot(0); 
pos = get(0,'ScreenSize');
set(gcf,'position',pos);
rand('seed',0);

plot(d(:,1),d(:,2),'b.','markersize',15);
set(gca,'ydir','reverse');
axis([-1 1 -1 1]);
axis('square');
set(gca,'xticklabel',[],'yticklabel',[])
set(gca,'xtick',[],'ytick',[])
xlabel('x','fontname','times','fontsize',14); 
ylabel('y','fontname','times','fontsize',14);

pause

[f2,c2,P,V,D,J,M]  = gkfast2(d,NC,m,eps,0);

pause;
close(1); clc