-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannels_comparison_COMB2.m
104 lines (101 loc) · 3.34 KB
/
channels_comparison_COMB2.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
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
signal_name=cell(1,1);
signal_name{1}='Lozeron130919';
signal_name{2}='Lozeron08092016';
signal_name{3}='Milani08092106';
signal_name{4}='Milani150916';
figure,
p=1;
for oo = 1:length(signal_name)
for o = 1:length(signal_name)-1
if oo == 2
o=o+3;
elseif oo == 3
o=o+6;
elseif oo == 4
o=o+9;
else
o=o;
end
signame=signal_name{oo};
str_MI=load(['./seminario5_MI/',signame,'_MI_signal8.mat']);
MI_hists=str_MI.str_MI;
str_MI_REV=load(['./seminario5_MI/',signame,'_MI_signal8REV.mat']);
MI_hists_REV=str_MI_REV.str_MI;
str_MI_COMB1=load(['./seminario5_MI/',signame,'_MI_signal8COMB1.mat']);
MI_hists_COMB1=str_MI_COMB1.str_MI;
str_MI_COMB2=load(['./seminario5_MI/',signame,'_MI_signal8COMB2.mat']);
MI_hists_COMB2=str_MI_COMB2.str_MI;
str_MI_RAND=load(['./seminario5_MI/',signame,'_MI_signal8RAND.mat']);
MI_hists_RAND=str_MI_RAND.str_MI;
if mod(p,3)==1
p=1;
elseif mod(p,3)==2
p=2;
elseif mod(p,3)==0
p=3;
end
hold on,
subplot(4,3,o),histogram(MI_hists(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_REV(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_COMB1(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_COMB2(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_RAND(p).MI,20)
hold on,
subplot(4,3,o),title(['Mutual Information, ',MI_hists(p).name, ', ',signame]),
subplot(4,3,o),grid, legend('MI', 'REV MI', 'COMB1 MI', 'COMB2 MI', 'RAND MI')
subplot(4,3,o), xlim([0 2])
p=p+1;
end
end
figure,
p=1;
for oo = 1:length(signal_name)
for o=1:length(signal_name)-1
if oo == 2
o=o+3;
elseif oo == 3
o=o+6;
elseif oo == 4
o=o+9;
else
o=o;
end
signame=signal_name{oo};
str_MI=load(['./seminario5_MI/',signame,'_MI_signal8.mat']);
MI_hists=str_MI.str_MI;
str_MI_REV=load(['./seminario5_MI/',signame,'_MI_signal8REV.mat']);
MI_hists_REV=str_MI_REV.str_MI;
str_MI_COMB1=load(['./seminario5_MI/',signame,'_MI_signal8COMB1.mat']);
MI_hists_COMB1=str_MI_COMB1.str_MI;
str_MI_COMB2=load(['./seminario5_MI/',signame,'_MI_signal8COMB2.mat']);
MI_hists_COMB2=str_MI_COMB2.str_MI;
str_MI_RAND=load(['./seminario5_MI/',signame,'_MI_signal8RAND.mat']);
MI_hists_RAND=str_MI_RAND.str_MI;
if mod(p,3)==1
p=4;
elseif mod(p,3)==2
p=5;
elseif mod(p,3)==0
p=6;
end
hold on,
subplot(4,3,o),histogram(MI_hists(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_REV(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_COMB1(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_COMB2(p).MI,20)
hold on,
subplot(4,3,o),histogram(MI_hists_RAND(p).MI,20)
hold on,
subplot(4,3,o),title(['Mutual Information, ',MI_hists(p).name, ', ',signame]),
subplot(4,3,o),grid, legend('MI', 'REV MI', 'COMB1 MI', 'COMB2 MI', 'RAND MI')
subplot(4,3,o), xlim([0 2])
p=p+1;
end
end