-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFigure_4_help.m
More file actions
42 lines (34 loc) · 1.77 KB
/
Figure_4_help.m
File metadata and controls
42 lines (34 loc) · 1.77 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
%% Figure 1 Setup
figure(1);
hold on; box on; grid on;
%% Data Loading
% Load without rotation data
aa_1 = load('Td_wo_rotation_32'); Td_wo_rotation_32 = aa_1.Td_wo_rotation;
bb_1 = load('Td_wo_rotation_64'); Td_wo_rotation_64 = bb_1.Td_wo_rotation;
cc_1 = load('Td_wo_rotation_128'); Td_wo_rotation_128 = cc_1.Td_wo_rotation;
% Load dynamic rotation data
aa_2 = load('Td_w_dynamic_rotation_32'); Td_w_dynamic_rotation_32 = aa_2.Td_w_dynamic_rotation;
bb_2 = load('Td_w_dynamic_rotation_64'); Td_w_dynamic_rotation_64 = bb_2.Td_w_dynamic_rotation;
cc_2 = load('Td_w_dynamic_rotation_128'); Td_w_dynamic_rotation_128 = cc_2.Td_w_dynamic_rotation;
%% Parameters
total_time = 20;
speed = 1;
moving_distance = linspace(1, total_time, total_time) .* speed;
%% Plotting Data
p1 = plot(moving_distance, Td_wo_rotation_32, 'r:', 'LineWidth', 3);
p2 = plot(moving_distance, Td_w_dynamic_rotation_32, 'r-', 'LineWidth', 3);
p3 = plot(moving_distance, Td_wo_rotation_64, 'b:', 'LineWidth', 3);
p4 = plot(moving_distance, Td_w_dynamic_rotation_64, 'b-', 'LineWidth', 3);
p5 = plot(moving_distance, Td_wo_rotation_128, 'k:', 'LineWidth', 3);
p6 = plot(moving_distance, Td_w_dynamic_rotation_128, 'k-', 'LineWidth', 3);
%% Labeling and Legend
xlabel('Moving Distance (m)', 'Interpreter', 'LaTex');
ylabel('Delay Spread (s)', 'Interpreter', 'LaTex');
% title('SE for One Vehicle Pass', 'Interpreter', 'LaTex');
legend([p1(1), p2(1), p3(1), p4(1), p5(1), p6(1)], ...
'w/o rotation $M\times N = 32^2$', 'w/ dynamic rotation $M\times N = 32^2$', ...
'w/o rotation $M\times N = 64^2$', 'w/ dynamic rotation $M\times N = 64^2$', ...
'w/o rotation $M\times N = 128^2$', 'w/ dynamic rotation $M\times N = 128^2$', ...
'Interpreter', 'LaTex', 'Location', 'NorthEast');
axis([2, 5, 6e-8, 7.2e-8]);
toc;