-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_hos_data.m
More file actions
134 lines (108 loc) · 3.73 KB
/
plot_hos_data.m
File metadata and controls
134 lines (108 loc) · 3.73 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
clc
clear all
close all
% load all packages
addpath(genpath('additional-packages'));
addpath(genpath('stimuli'));
addpath(genpath('results'));
resultsDir = strcat(pwd,'\results\room_statistical_analysis\');
resultsFilenames = dir(resultsDir);
hosDataFilenames = {};
for i = 1:length(resultsFilenames)
if contains(resultsFilenames(i).name, "hos_", 'IgnoreCase', true)
hosDataFilenames{end+1} = resultsFilenames(i).name;
end
end
hosDataLabel = [];
for i = 1:length(hosDataFilenames)
label = erase(hosDataFilenames(i), "hos_");
label = erase(label, ".mat");
hosDataLabel = [hosDataLabel, string(label)];
end
degree = ["0", "30", "45", "60", "90", "min30", "min45", "min60", "min90"];
room = ["Anechoic", "Room A", "Room B", "Room C", "Room D"];
%% plot kurtosis data
for deg = 9%:length(degree)
lowfig = figure;
highfig = figure;
for i = 1:length(hosDataFilenames)
hosDataName = strcat(pwd,'\results\room_statistical_analysis\', hosDataFilenames{i});
load(hosDataName)
data = hexakikurtosis_data;
for j = 1:3
l = data{deg}{1}(j,:);
r = data{deg}{2}(j,:);
if j <= 6
set(0, "CurrentFigure", lowfig)
subplot(3,2,j+(j-1))
plot(l, "-x", "MarkerSize", 5)
ylabel("Value")
hold on
xticklabels(room);
grid on
if j+(j-1) == 1
axP = get(gca,'Position');
legend(hosDataLabel, Orientation="horizontal", Location="northoutside")
set(gca, 'Position', axP)
end
if j+(j-1) == 5
xticklabels(room)
else
xticklabels(["","","","",""])
end
subplot(3,2,2*j)
plot(r, "-x", "MarkerSize", 5)
ylabel("Value")
hold on
xticklabels(room)
grid on
if 2*j == 2
axP = get(gca,'Position');
legend(hosDataLabel, Orientation="horizontal", Location="northoutside")
set(gca, 'Position', axP)
end
if 2*j == 6
xticklabels(room)
else
xticklabels(["","","","",""])
end
end
if j > 6
set(0, "CurrentFigure", highfig)
subplot(6,2,2*j-13)
plot(l, "-x", "MarkerSize", 5)
ylabel("Value")
hold on
xticklabels(room)
grid on
if 2*j-13 == 1
axP = get(gca,'Position');
legend(hosDataLabel, Orientation="horizontal", Location="northoutside")
set(gca, 'Position', axP)
end
if 2*j-13 == 11
xticklabels(room)
else
xticklabels(["","","","",""])
end
subplot(6,2,2*j-12)
plot(r, "-x", "MarkerSize", 5)
ylabel("Value")
hold on
xticklabels(room)
grid on
if 2*j-12 == 2
axP = get(gca,'Position');
legend(hosDataLabel, Orientation="horizontal", Location="northoutside")
set(gca, 'Position', axP)
end
if 2*j-12 == 12
xticklabels(room)
else
xticklabels(["","","","",""])
end
end
end
clear kurtosis_data
end
end