G1 = [
           10            0            0         0.21      0.20714      0.20429
           10            3            0      0.16952      0.15905      0.16286
           10            6            0      0.12429     0.094286      0.11857
           10            9            0     0.051429     0.014643     0.038929
           10           12            0     0.019643    0.0021429     0.014286
           10           15            0    0.0087857    0.00022       0.0024286
];

% known channel BER at SNR 15 is extrapolated

hold off
subplot(2,2,1)
semilogy(G1(:,2),G1(:,5),'k-')
hold on
semilogy(G1(:,2),G1(:,4),'k-.')
semilogy(G1(:,2),G1(:,6),'k--')
xlabel 'SNR (dB)'
ylabel 'BER'
hold off

% a = axis;

x = 0.5; % 11; % a(1) + (a(2)-a(1))/20;
y = 0.3e-2; % 1.2e-1; % a(3) + (a(4)-a(3))/20;

text(x,y, ['.-.-.- EM               '; ...
           '----- ML                '; ...
           '\_\_\_\_\_ known channel']);


title 'v = 0.01'

G2 = [
           10            0            0      0.24571      0.23857      0.24571
           10            3            0      0.15524      0.16667      0.15714
           10            6            0     0.077857     0.072857        0.075
           10            9            0     0.029643     0.028929     0.029643
           10           12            0    0.0055357    0.0042857    0.0051786
           10           15            0   0.00053571   0.00044643   0.00053571
];

%%         10           18            0   9.5238e-05            0   9.5238e-05

hold off
subplot(2,2,2)
semilogy(G2(:,2),G2(:,5),'k-')
hold on
semilogy(G2(:,2),G2(:,4),'k-.')
semilogy(G2(:,2),G2(:,6),'k--')
xlabel 'SNR (dB)'
ylabel 'BER'
hold off

% a = axis;

x = 0.5; % 11; % a(1) + (a(2)-a(1))/20;
y = 0.3e-2; % 1.2e-1; % a(3) + (a(4)-a(3))/20;

text(x,y, ['.-.-.- EM               '; ...
           '----- ML                '; ...
           '\_\_\_\_\_ known channel']);


title 'v = 0.001'
