Skip to content
Newer
Older
100644 29 lines (25 sloc) 995 Bytes
0e2ea4d @KingMob initial commit
authored
1 function elec = read_electrode_info(elec_files)
2 if(ischar(elec_files))
3 elec_files = cellstr(elec_files);
4 end
5
6 elec.names = [];
7 elec.coords = [];
8 elec.subj = [];
9 elec.pvals = [];
10 elec.stat = [];
11 elec.data_val = [];
12 elec.signif = logical([]);
13
14 for i=1:length(elec_files)
15 [elec_namesi x y z] = textread(elec_files{i}, '%s %f %f %f %*[^\n\r]');
16 elec_namesi = standardize_elec_names(elec_namesi);
17
18 elec.names = [elec.names; elec_namesi];
19 elec.coords = [elec.coords; [x y z]];
20 elec.subj = [elec.subj; i * ones(size(elec_namesi))];
21 elec.data_val = [elec.data_val; zeros(size(elec_namesi))];
22 elec.signif = [elec.signif; false(size(elec_namesi))];
23 elec.pvals = [elec.pvals; ones(size(elec_namesi))];
24 elec.stat = [elec.stat; zeros(size(elec_namesi))];
25
26 [~, sort_idx] = sort(elec_namesi);
27 elec = reorder_electrodes(elec, i, sort_idx);
28 end
29 end
Something went wrong with that request. Please try again.