-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplot_pattern_2d.m
More file actions
76 lines (69 loc) · 2.54 KB
/
Copy pathplot_pattern_2d.m
File metadata and controls
76 lines (69 loc) · 2.54 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
% ########### ########### ########## ##########
% ############ ############ ############ ############
% ## ## ## ## ## ## ##
% ## ## ## ## ## ## ##
% ########### #### ###### ## ## ## ## ######
% ########### #### # ## ## ## ## # #
% ## ## ###### ## ## ## ## # #
% ## ## # ## ## ## ## # #
% ############ ##### ###### ## ## ## ##### ######
% ########### ########### ## ## ## ##########
%
% S E C U R E M O B I L E N E T W O R K I N G
%
%
% plot_pattern_2d - Plot 2D Antenna Sector Patterns
%
% Other m-files required: mmpolar/mmpolar.m
% Subfunctions: none
% MAT-files required: sectorpattern_2d_sta.mat, sectorpattern_2d_ap.mat
%
% Author: Daniel Steinmetzer
% email address: dsteinmetzer@seemoo.tu-darmstadt.de
% Website: https://ww.seemoo.de
% Date: 2017
%------------- BEGIN CODE --------------
clear; close all;
p_sta = load('sectorpattern_2d_sta.mat');
p_ap = load('sectorpattern_2d_ap.mat');
path('mmpolar',path)
% Plot the TX Patterns
for s = 1:numel(p_sta.sector_set)
sector_id = string(p_sta.sector_set(s));
figure(s)
mmpolar(p_sta.az/180*pi, ...
(p_sta.pattern_snr(:,:,s)), ...
'RLimit', [-8, 17], ...
'TTickDelta', 30, ...
'TTickLabel', { '0^\circ', '30^\circ', '', '', '', '150^\circ', '180^\circ', '-150^\circ', '', '', '', '-30^\circ'}, ...
'RGridLineStyle', ':', ...
'TGridLineStyle', ':', ...
'TTickOffset', 0.25, ...
'TTickVisible', 'on', ...
'TTickDirection', 'out', ...
'RTickValue', [0, 10], ...
'RTickVisible', 'off', ...
'RTickOffset', 0.06, ...
'Style', 'Compass')
title(strcat("Sector ", sector_id))
end
% Plot the RX Pattern
s = 34;
sector_id = string(p_ap.sector_set(s));
figure(35)
mmpolar(p_ap.az/180*pi, ...
(p_ap.pattern_snr(:,:,s)), ...
'RLimit', [-8, 17], ...
'TTickDelta', 30, ...
'TTickLabel', { '0^\circ', '30^\circ', '', '', '', '150^\circ', '180^\circ', '-150^\circ', '', '', '', '-30^\circ'}, ...
'RGridLineStyle', ':', ...
'TGridLineStyle', ':', ...
'TTickOffset', 0.25, ...
'TTickVisible', 'on', ...
'TTickDirection', 'out', ...
'RTickValue', [0, 10], ...
'RTickVisible', 'off', ...
'RTickOffset', 0.06, ...
'Style', 'Compass')
title(strcat("Sector RX"))
%------------- END OF CODE --------------