[Eeglablist] runica not recognized as a parameter in pop_runica

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Fri Aug 19 13:08:14 PDT 2016


Greetings Vishal, some more info to help you here, please be sure try it.
Remember also to use eegh and to review the eeglab scripting tutorial.
The example script below shows you the way to run ICA on one file at a
time. Try it this way and it should work.
If you haven't had a chance yet, just type eegh after you do the following,
and review the eegh output
1) loading a file, 2) running ICA on it, 3) save it with new file name, 4)
clear eeglab of datasets
You can cut and paste the below into matlab and run it after making a few
modifications.
I've named the variables so it's clear what info you need to put there when
you change the code.
Your best bet is to make one loop for one file, and show that it works.
After that, run that on all your files.


%%%%%%%%%%%%start your loop here

for NUMBERofFilestoLoopThrough = 1: TotalNumberofFilesthatNeed_ICA

NAMEofCURRENTfiletodoICAon = YourFileNameLIst(NUMBERofFilestoLoopThrough);
  %%%%grab a specific .set filename
NEWNAMEoffileWITH_ICA = [NAMEofCURRENTfiletodoICAon 'withICA']; %%%specify
the new file name to save with after ICA

ALLEEG EEG CURRENTSET ALLCOM] = eeglab;  %%%%%start eeglab

EEG = pop_loadset('filename',NAMEofCURRENTfiletodoICAon ,cd);
 %%%%%%%%%load the eeglab file
[ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 0 ); EEG =
eeg_checkset( EEG );  %%%%update eeglab memory

EEG = pop_runica(EEG, 'extended',1,'interupt','on');   %%%%%run ica

[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); %%%%%update eeglab memory

EEG = pop_saveset( EEG,
'filename',NEWNAMEoffileWITH_ICA
,'filepath',FilepathWhereYouwantTOstoreYourFileswithICA);
 %%%save your dataset in your ICA folder

[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); STUDY = []; CURRENTSTUDY
= 0; ALLEEG = []; EEG=[]; CURRENTSET=[];  %empty eeglab memory

end   %%%%%%%%%%%%%%%%%end of your loop here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160819/1048d498/attachment.html>


More information about the eeglablist mailing list