|
1 | 1 | clear variables |
2 | 2 | eeglab |
3 | | -Group = {'Aging' 'Control' 'ASD'}; %'Control' |
| 3 | +Group = { 'ASD' 'Control' 'Aging'}; % |
4 | 4 |
|
5 | 5 | for g=1:length(Group) |
6 | 6 | switch Group{g} |
7 | 7 | case 'Control' |
8 | | - home_path = '\\data.einsteinmed.org\users\Filip Ana Douwe\Resting state data\Control\'; |
| 8 | + home_path = 'C:\Users\dohorsth\Desktop\Testing restingstate\Control\'; |
9 | 9 | subject_list = {'12512' '12648' '12651' '12707' '12727' '12739' '12750' '12815' '12898' '12899' '10033' '10130' '10131' '10158' '10165' '10257' '10281' '10293' '10360' '10369' '10384' '10394' '10407' '10438' '10446' '10451' '10463' '10467' '10476' '10501' '10526' '10534' '10545' '10561' '10562' '10581' '10585' '10616' '10615' '10620' '10639' '10748' '10780' '10784' '10822' '10858' '10906' '10915' '10929' '10935' '10844' '10956' '12005' '12007' '12010' '12215' '12328' '12360' '12413' };% ------------------------------------------------ |
10 | 10 | case 'ASD' |
11 | 11 | home_path = 'C:\Users\dohorsth\Desktop\Testing restingstate\ASD\'; |
|
25 | 25 | % Path to the folder containing the current subject's data |
26 | 26 | data_path = [home_path subject_list{s} '\\']; |
27 | 27 | fprintf('\n\n\n**** %s: Loading dataset ****\n\n\n', subject_list{s}); |
28 | | - EEG = pop_loadset('filename', [subject_list{s} '_triggerfix.set'], 'filepath', data_path); |
| 28 | + EEG = pop_loadset('filename', [subject_list{s} '_triggerfix.set'], 'filepath', data_path); |
29 | 29 | %re-referencing, if refchan is empty this get's skipped |
30 | 30 | if isempty(refchan)~=1 %if no re-reference channels chose this gets skipped |
31 | 31 | for j=1:length(EEG.chanlocs) |
|
64 | 64 | EEG = pop_runica(EEG, 'extended',1,'interupt','on','pca',pca); %using runica function, with the PCA part |
65 | 65 | EEG = eeg_checkset( EEG ); |
66 | 66 | EEG = pop_saveset( EEG, 'filename',[subject_list{s} '_ica.set'],'filepath', data_path); |
67 | | - |
68 | 67 | %organizing components |
69 | 68 | clear bad_components brain_ic muscle_ic eye_ic hearth_ic line_noise_ic channel_ic other_ic |
70 | 69 | EEG = iclabel(EEG); %does ICLable function |
|
92 | 91 | EEG = pop_subcomp( EEG, [bad_components], 0); %excluding the bad components |
93 | 92 | close all |
94 | 93 | else %instead of only plotting bad components it will plot all components |
95 | | - title(subject_list{s}); text( 0.2,0.5, 'there are no eye-components found') |
96 | | - pop_topoplot(EEG, 0, 1:length(ICA_components) ,subject_list{s},[ceil(sqrt(length(ICA_components))) ceil(sqrt(length(ICA_components)))] ,0,'electrodes','on'); |
97 | | - title(subject_list{s}); |
| 94 | + title(subject_list{s}); text( 0.2,0.5, 'there are no eye-components found') |
98 | 95 | print([figure_path subject_list{s} '_Bad_ICs_topos'], '-dpng' ,'-r300'); |
99 | 96 | end |
100 | 97 | title(subject_list{s}); |
|
0 commit comments