-
Notifications
You must be signed in to change notification settings - Fork 9
/
plot_5a_5b.m
44 lines (38 loc) · 1.5 KB
/
plot_5a_5b.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
41
42
clear all;
close all; clc;
load('data_txpower2');
fig1 = figure;
hold on;
plot(p_sig_dBm, R_irs_256_full,'-','LineWidth',1.5);
plot(p_sig_dBm, R_irs_64_full,'-','LineWidth',1.5);
plot(p_sig_dBm, R_irs_256,'--','LineWidth',1.5);
plot(p_sig_dBm, R_irs_64,'--','LineWidth',1.5);
plot(p_sig_dBm, R_irs_256_full_sub,'--','LineWidth',1.5);
plot(p_sig_dBm, R_irs_64_full_sub,'--','LineWidth',1.5);
plot(p_sig_dBm, R_nirs,'-','LineWidth',1.5);
hold off;
grid on;
xlabel('Tx Power (dBm)');
ylabel('Achievable Rate (bits/s/Hz)');
legend('with IRS(256) full CSI','with IRS(64) full CSI', ...
'with IRS(256) position based','with IRS(64) position based',...
'with IRS(256) 2x2 grouping','with IRS(64) 2x2 grouping',...
'without IRS','Location','best');
title('Full CSI vs. Position based Beamforming');
print(gcf,'achievable_rate_vs_txpower_pos.png','-dpng','-r400');
fig2 = figure;
hold on;
plot(p_sig_dBm, R_irs_256_full,'-','LineWidth',1.5);
plot(p_sig_dBm, R_irs_64_full,'-','LineWidth',1.5);
plot(p_sig_dBm, R_irs_256_full_sub,'--','LineWidth',1.5);
plot(p_sig_dBm, R_irs_64_full_sub,'--','LineWidth',1.5);
plot(p_sig_dBm, R_nirs,'-','LineWidth',1.5);
hold off;
grid on;
xlabel('Tx Power (dBm)');
ylabel('Achievable Rate (bits/s/Hz)');
legend('with IRS(256) full CSI','with IRS(64) full CSI', ...
'with IRS(256) 2x2 grouping','with IRS(64) 2x2 grouping', ...
'without IRS','Location','best');
title('Full CSI vs. Grouping based Beamforming');
print(gcf,'achievable_rate_vs_txpower_sub.png','-dpng','-r400');