%close all
frequency = 3e9;
antenna_spacing = 1/4/frequency;
x_number_total = [10,60,180];

for z_iter = 1:length(x_number_total)
    x_number = x_number_total(z_iter);
axis = cell(x_number,1);
for i = 1:x_number
            axis{i} = [i*antenna_spacing];
end

[kernel_matrix] = kernel_calculate(frequency,axis,"1d");

eigen_value = eig(kernel_matrix);
eigen_value = flip(eigen_value);


 eigen_value = eigen_value/eigen_value(1);

if(z_iter==1)
    figure
    plot(1:18:180,eigen_value,'-s','color','red','Linewidth',1.5,'markersize',4)
elseif(z_iter==2)
    hold on
    plot(1:3:180,eigen_value,'-o','color','m','Linewidth',1.5,'markersize',4)
elseif(z_iter==3)
    hold on
    plot(1:180,eigen_value,'-+','color','blue','Linewidth',1.5,'markersize',4)
end
end
grid on
xlabel('number of eigenvalue','Interpreter','latex','FontSize',14);
ylabel('eigenvalue','Interpreter','latex','FontSize',14);
legend('$\Omega T = 2.5 \pi$','$\Omega T = 15 \pi$','$\Omega T = 45 \pi$','Interpreter','latex')