-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdraw_graphs.m
52 lines (37 loc) · 826 Bytes
/
draw_graphs.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
43
44
45
46
47
48
49
50
51
52
y = 1:100;
x = randsample(5, 100, true);
k = x;
w = randsample(5, 100, true);
q = randsample(5, 100, true);
e = randsample(5, 100, true);
figure;
plot(y,x,'ko', 'MarkerSize', 4, 'MarkerFaceColor', 'r');
hold on;
grid on;
grid minor;
plot(y,w,'ko', 'MarkerSize', 8);
hold on;
ylabel('Selected precoder index');
xlabel('Number of trial');
xlim([0 100])
ylim([0 6])
xbounds = ylim;
set(gca,'YTick',xbounds(1):xbounds(2));
hold off;
% legend('Optimal','Proposed');
legend('Optimal','LR-based');
figure;
plot(y,x,'ko', 'MarkerSize', 4, 'MarkerFaceColor', 'r');
hold on;
grid on;
grid minor;
plot(y,k,'ko', 'MarkerSize', 8);
hold on;
ylabel('Selected precoder index');
xlabel('Number of trial');
xlim([0 100])
ylim([0 6])
xbounds = ylim;
set(gca,'YTick',xbounds(1):xbounds(2));
hold off;
legend('Optimal','LR-based');