function [clusters,dist,hubs]=setup(data) %SETUP [clusters,dist,hubs]=setup(data) % This function assigns to the cluster array all ones, (telling that % all points belong to Hub 1), assigns to the hub array a one in % position 1 (telling that the first hub is point 1) and zeros in all % other locations. The distance array contains the square of the % distance from each point to hub one. n=size(data,1); clusters=ones(n,1); hubs=zeros(n,1); hubs(1,1)=1; dist = distance(data,clusters); end