[Eeglablist] (no subject)
Magdalene Ortmann
leniortmann at googlemail.com
Thu Nov 5 09:57:21 PST 2009
Dear all,
I have a problem concerning automatic data processing. As long as I run
scripts, everything runs perfect. But as soon as I transform a script into a
function with input parameters, it errors out (in this case at the end of
the shown example).The error message sais: ??? Index exceeds matrix
dimensions.
Is this a problem of the ALLEEG indexing?
The script thereby uses exactly the same parameter, filenames, path etc: as
the function does:
script:
InpathPol='F:\experimente\MMN-CI\EG-CI\EAN75\Logo50'
Infile='EAN75Logo50L1c.vhdr'
prefix=Infile(1:end-5);
InpathEEG='F:\experimente\MMN-CI\EG-CI\EAN75\Logo50\L1c'
DeadChannels=[13 16 23 24 25 26]
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
EEG = pop_loadbv(InpathEEG, Infile, [1 644910], [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]);
prefix=Infile(1:end-5);
EEG.setname=prefix;
EEG = eeg_checkset( EEG );
%Average Reference
EEG = pop_reref( EEG, []);
EEG.setname=[prefix 'AvRef'];
EEG = eeg_checkset( EEG );
[ALLEEG EEG index] = eeg_store(ALLEEG, EEG);
EEG = pop_saveset( EEG, 'filename', [prefix 'AvRef.set'], 'filepath',
InpathEEG);
%Lowpass filter 25Hz
EEG = pop_iirfilt( EEG, 0, 25, [], [0]);
EEG.setname=[prefix 'AvRefLP25'];
EEG = eeg_checkset( EEG );
[ALLEEG EEG index] = eeg_store(ALLEEG, EEG);
EEG = pop_saveset( EEG, 'filename', [prefix 'AvRefLP25.set'], 'filepath',
InpathEEG);
%Data are shown und visually rejected
EEG = eeg_checkset( EEG );
EEG.setname=[prefix 'AvRefLP25Vrej'];
pop_eegplot( EEG, 1, 0, 1);
EEG = eeg_checkset( EEG );
Function:
function []= DatenauswertungMMNCIRun2u3
(InpathEEG,InpathPol,Infile,DeadChannels)
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
EEG = pop_loadbv(InpathEEG, Infile, [1 644910], [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]);
prefix=Infile(1:end-5);
EEG.setname=prefix;
EEG = eeg_checkset( EEG );
%Average Reference
EEG = pop_reref( EEG, []);
EEG.setname=[prefix 'AvRef'];
EEG = eeg_checkset( EEG );
[ALLEEG EEG index] = eeg_store(ALLEEG, EEG);
EEG = pop_saveset( EEG, 'filename', [prefix 'AvRef.set'], 'filepath',
InpathEEG);
%Lowpassfilter 25Hz
EEG = pop_iirfilt( EEG, 0, 25, [], [0]);
EEG.setname=[prefix 'AvRefLP25'];
EEG = eeg_checkset( EEG );
[ALLEEG EEG index] = eeg_store(ALLEEG, EEG);
EEG = pop_saveset( EEG, 'filename', [prefix 'AvRefLP25.set'], 'filepath',
InpathEEG);
%Data are shown und visually rejected
EEG = eeg_checkset( EEG );
EEG.setname=[prefix 'AvRefLP25Vrej'];
pop_eegplot( EEG, 1, 0, 1);
EEG = eeg_checkset( EEG );
etc...
Does anybody know, what I can do to run the function instead of the
script? Because this is simple more practicle.
Thanks a lot,
Magdalene Ortmann
--
Dipl. Psych. Magdalene Ortmann
Institut für Biomagnetismus und Biosignalanalyse
Universität Münster
Malmedyweg 15
48149 Münster
Germany
Tel.: (49) 0251/83-56855
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20091105/27fd0c1c/attachment.html>
More information about the eeglablist
mailing list