clear all
close all

% for a given even polynomial degree, we compute
% and plot the corresponding Morrow-Patterson pts

n=input('Dammi il grado n = ')

r=n/2+1;

for m=1:n+1
x_mp=cos(m*pi/(n+2));

if rem(m,2) ==0    
for k=1:r

    y_mp(k)=cos((2*k-1)*pi/(n+3));
end

else
   
  for k=1:r
    y_mp(k)=cos(2*k*pi/(n+3));
       
  end
end

xmp=repmat(x_mp, r,1);


plot(xmp, y_mp, '*');
hold on
end

