1 function  c  = getClusters( M, coding, shape, phi )
     3 if strcmp(shape,'star')
     6     r1 = 1*exp(1j*phase1);  % first radius
     7     r2 = 2*exp(1j*phase2);  % second radius
     8     c = [ r1*exp(1i*2*pi/(M/2)*(0:(M/2-1)))  r2*exp(1i*2*pi/(M/2)*(0:(M/2-1)))];
     9 elseif strcmp(shape,'linear')
    10     c=linspace(-M/2, M/2, M);
    15     c = sum(combvec(c,1j*c));
    16     c = c*modnorm(c,'avpow',1);
    17     c = [real(c); imag(c)]';
    18     [theta, rho] = cart2pol(c(:,1),c(:,2));
    19     [cx, cy] = pol2cart(theta + phi, rho);
    22     c = qammod(0:M-1,M, phi, coding);
    24 c = c*modnorm(c,'avpow',1);
 function iswhole(in x, in tol)
Determine whether or not input is a whole number.