-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathorganize_manualSubjectReject.m
More file actions
47 lines (34 loc) · 1.51 KB
/
organize_manualSubjectReject.m
File metadata and controls
47 lines (34 loc) · 1.51 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
function [aver, medianValue, SD_rms, SD, N] = organize_manualSubjectReject(i, ij, k, j, l, aver, medianValue, SD_rms, SD, N)
% aver
% whos
%% MOVE A BIT EARLIER IN THE SCRIPT at some point, computationally inefficient here
subjOffset = 49;
if length(aver) == 1 && k ~= 1 % from organize_averageForScalars
if i == 3 && ij+subjOffset == 56
% subject 56 should go here
%disp(['subject = ', num2str(ij+subjOffset), ', trial = ', num2str(k), ', period = ', num2str(l), ', freqBin = ', num2str(j), ', aver = ', num2str(nanmean(aver)), ' ... convert to NaN'])
aver = NaN;
medianValue = NaN;
SD_rms = NaN;
SD = NaN;
N = NaN;
end
else % from organize_averageTheTrials
if i == 3 && ij+subjOffset == 56 && k ~= 1
% subject 56 should go here
% disp(['subject = ', num2str(ij+subjOffset), ', trial = ', num2str(k), ', period = ', num2str(l), ', freqBin = ', num2str(j), ', aver = ', num2str(nanmean(aver)), ' ... convert to NaN'])
aver(:) = NaN;
medianValue(:) = NaN;
SD_rms(:) = NaN;
try
SD(:) = NaN;
catch
aver
medianValue
SD_rms
SD
N
end
N(:) = NaN;
end
end