clear all; close all; clc

xi = linspace(0,pi/4); 

I = sqrt(-1); 

C1 = 0.50; G1 = NumericalG(C1,xi); G1_ex = exp(-I*C1*xi); 

figure(1); clf 
plot(xi,abs(G1.CN), xi,abs(G1.TG2), xi,abs(G1.TG2_FD), ...
    xi,abs(G1.TG3), xi,abs(G1.CJ), 'LineWidth',2)
l = legend('CN','LW','LW-FD','TG3','CJ'); 
set(l,'FontSize',24,'Location','SouthWest')
%set(gca,'FontSize',24,'XTick',0:pi/8:pi/2,...
%    'XTickLabel',{'0','pi/8','pi/4','3pi/8','pi/2'})
set(gca,'FontSize',24,'XTick',0:pi/16:pi/4,...
    'XTickLabel',{'0','pi/16','pi/8','3pi/16','pi/4'})
xlabel('\xi','FontSize',24)
ylabel('|G|','FontSize',24)
v = axis; axis([0,xi(end),v(3),v(4)])
grid on
set(gcf,'color',[1,1,1])


figure(2); clf 
plot(xi,angle(G1.CN)./angle(G1_ex), xi,angle(G1.TG2)./angle(G1_ex), ...
    xi,angle(G1.TG2_FD)./angle(G1_ex), xi,angle(G1.TG3)./angle(G1_ex), ...
    xi,angle(G1.CJ)./angle(G1_ex), 'LineWidth',2)
l = legend('CN','LW','LW-FD','TG3','CJ'); 
set(l,'FontSize',24,'Location','SouthWest')
%set(gca,'FontSize',24,'XTick',0:pi/8:pi/2,...
%    'XTickLabel',{'0','pi/8','pi/4','3pi/8','pi/2'})
set(gca,'FontSize',24,'XTick',0:pi/16:pi/4,...
    'XTickLabel',{'0','pi/16','pi/8','3pi/16','pi/4'})
ylabel('phase error','FontSize',24)
v = axis; axis([0,xi(end),v(3),v(4)])
grid on
set(gcf,'color',[1,1,1])


figure(3); clf 
plot(xi,abs(G1.CN)./abs(G1_ex), xi,abs(G1.TG2)./abs(G1_ex), xi,abs(G1.TG2_FD)./abs(G1_ex), ...
    xi,abs(G1.TG3)./abs(G1_ex), xi,abs(G1.CJ)./abs(G1_ex), 'LineWidth',2)
l = legend('CN','LW','LW-FD','TG3','CJ'); 
set(l,'FontSize',24,'Location','SouthWest')
%set(gca,'FontSize',24,'XTick',0:pi/8:pi/2,...
%    'XTickLabel',{'0','pi/8','pi/4','3pi/8','pi/2'})
set(gca,'FontSize',24,'XTick',0:pi/16:pi/4,...
    'XTickLabel',{'0','pi/16','pi/8','3pi/16','pi/4'})
xlabel('\xi','FontSize',24)
ylabel('damping error','FontSize',24)
v = axis; axis([0,xi(end),v(3),v(4)])
grid on
set(gcf,'color',[1,1,1])