% Control1_1_JMS.m
% Solution to problem 1.B of Control 1
% JMS, Oct.2022

clear all
R = 1;
nr = 13;
ir0 = [3,7,11];

ir = 1:nr;
ar = 2*pi*ir/nr;
r = [cos(ar);sin(ar)];
D = Distancia_JMS(r);

figure(11)
plot(ir,D(ir0,ir),'-o','LineWidth',1.5)
legend([repmat('i_0 = ',3,1),num2str(ir0')])
xlabel('Point index i')
ylabel('Distance |r_i-r_0|')
set(gca,'FontSize',15)
grid on
