-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeanHistEB1.m
42 lines (26 loc) · 875 Bytes
/
meanHistEB1.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
function [v_good,stats] = meanHistEB1
fileList = searchFiles('config001_5p00_track_bidir_uni_dir_analysisRecord.mat','','ask',1);
nMovies = size(fileList,1);
v = [];
for i = 1:nMovies
load(fullfile(fileList{i,2},fileList{i,1}));
t(i).v = avgV;
v = [v,avgV];
clear avgV
end
mean_v = mean(v);
for i = 1:nMovies
[h_mean(i),p_mean(i)] = ttest2(v,t(i).v);
mean_vi = mean(t(i).v);
[h_dist(i),p_dist(i)] = kstest2(v/mean_v,t(i).v/mean_vi);
end
good_mean = (p_mean > 0.00005);
good_dist = (p_dist > 0.00005);
% good = good_mean & good_dist;
good = good_dist;
v_good = cat(2,t(good).v);
stats = cat(1,good,good_mean,p_mean,good_dist,p_dist)';
figure, hist(v_good)
figure,plot(log10(stats(:,3)),log10(stats(:,5)),'.')
xlabel('p mean bad->good')
ylabel('p dist bad->good')