-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaptPlotDataHists.m
More file actions
52 lines (45 loc) · 1.69 KB
/
aptPlotDataHists.m
File metadata and controls
52 lines (45 loc) · 1.69 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
function aptPlotDataHists
%APTPLOTSUMMARYRESULTS Summary of this function goes here
% Detailed explanation goes here
global apt
numBins = 15;
for iY = 1:length(apt.Y)
minVal = [];
maxVal = [];
for id = 1:length(apt.data)
minVal = min([minVal;apt.data(id).Y{iY}]);
maxVal = max([maxVal;apt.data(id).Y{iY}]);
end
edges= linspace(minVal,maxVal,numBins+1);
figure
for id = 1:length(apt.data)
subplot(length(apt.data),1,id)
histogram(apt.data(id).Y{iY},edges)
title(strrep(strrep(strrep(apt.data(id).filename,'_','\_'),'.csv',''),'Data/',''))
suptitle([apt.data(1).obsName{iY} '; n = ' num2str(sum(~isnan(apt.Y{iY})))])
end
if apt.config.doLog10(iY)
figure
subplot(2,1,1)
histogram(apt.Y{iY},numBins)
title(['Histogram of log10 of means - ' apt.data(1).obsName{iY}])
subplot(2,1,2)
if isfield(apt.config,'fitReplicates') && apt.config.fitReplicates
histogram(1./apt.weightsY{iY},numBins)
title('Histogram of standard errors (log10) calculated from replicates')
suptitle([apt.data(1).obsName{iY} '; n = ' num2str(sum(~isnan(apt.Y{iY})))])
end
else
figure
subplot(2,1,1)
histogram(apt.Y{iY},numBins)
title(['Histogram of means of ' apt.data(1).obsName{iY}])
subplot(2,1,2)
if isfield(apt.config,'fitReplicates') && apt.config.fitReplicates
histogram(1./apt.weightsY{iY},numBins)
title('Histogram of standard errors calculated from replicates')
suptitle([apt.data(1).obsName{iY} '; n = ' num2str(sum(~isnan(apt.Y{iY})))])
end
end
end
end