-
Notifications
You must be signed in to change notification settings - Fork 9
/
performance.m
40 lines (33 loc) · 1.15 KB
/
performance.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function [] = performance ()
SNRdB = 0 : 2 : 10;
SNRin = 10 .^ (SNRdB ./ 10);
SNRraddB = zeros(100, length(SNRin));
SNRmaxdB = zeros(100, length(SNRin));
SNReqdB = zeros(100, length(SNRin));
ErrorP = zeros(100, length(SNRin));
ErrorP2 = zeros(100, length(SNRin));
for idx = 1 : length(SNRin)
for jdx = 1 : 100
[~, SNRraddB(jdx, idx), SNRmaxdB(jdx, idx), SNReqdB(jdx, idx), ~, ErrorP(jdx, idx), ErrorP2(jdx, idx)] = cyclic2 (SNRin(idx));
end
end
SNRradplot = mean(SNRraddB);
SNRmaxplot = mean(SNRmaxdB);
SNReqplot = mean(SNReqdB);
ErrorPplot = mean(ErrorP);
ErrorP2plot = mean(ErrorP2);
figure
plot(SNRdB, SNRradplot, '-x', SNRdB, SNRmaxplot, '-o', SNRdB, SNReqplot, 'LineWidth', 1.5);
xlabel('input SNR (dB)');
ylabel('Radar SNR (dB)');
legend('Proposed Algorithm', 'Radar SNR Upper Bound', 'Equal Power per Subcarrier', 'Location', 'northwest');
title('Radar SNR Performance');
grid on;
figure
semilogy(SNRdB, ErrorPplot, '-x', SNRdB, ErrorP2plot, '-o', 'LineWidth', 1.5);
xlabel('input SNR (dB)');
ylabel('BER');
legend('Proposed Algorithm', 'Equal Power per Subcarrier', 'Location', 'southwest');
title('Communication BER Performance');
grid on;
end