%% Driver for the lbgUpdate - Example % Same as lbgExample, except with the Voronoi plots: X=rand(50,2); Temp=randperm(20); NumClusters=6; C=X(Temp(1:NumClusters),:); plot(C(:,1),C(:,2),'r*',X(:,1),X(:,2),'k.'); pause for j=1:10 [P,C,Err]=lbgUpdate(X,C); T(j)=mean(Err); T(j) voronoi(C(:,1),C(:,2)); hold on plot(X(:,1),X(:,2),'k.',C(:,1),C(:,2),'r*'); pause hold off end