Overlapping trials

Thomas Dijkman t.b.dijkman at STUDENT.UTWENTE.NL
Tue Jul 8 13:03:52 CEST 2008


Hi Natalia,

Your error seems te originate from this line: dat = ncs.dat(begsample:endsample); Either the begsample variable or the endsample variable isn't a positive number. As you probably know, matlab starts counting with 1 for vector and matrix indices. Since you mention the error doesn't come up when you take a trial 2 sec instead of 3 sec before the prestimbeam, my guess is that he sample index of the prestimbeam is more than 2 sec * samplefreq, but less then 3 sec * samplefreq. 
Perhaps you could elaborate a bit further about your experimental setup? All your trials have a different duration? 
I hope this helps,

Thomas Dijkman 


-----Oorspronkelijk bericht-----
Van: FieldTrip discussion list namens Natalia Grion
Verzonden: di 8-7-2008 11:50
Aan: FIELDTRIP at NIC.SURFNET.NL
Onderwerp: [FIELDTRIP] Overlapping trials
 
Dear All,
During reading and preprocessing lfps,  I find this error for some trials:

?? Subscript indices must either be real positive integers or logicals.
*Error in ==> read_data at 576
           dat = ncs.dat(begsample:endsample);*
Error in ==> read_fcdc_data at 49
[dat] = read_data(varargin{:});
Error in ==> preprocessing at 554
    dat = read_fcdc_data(cfg.datafile, hdr, begsample, endsample, 
rawindx, strcmp(cfg.continuous,
    'yes'));
Error in ==> FreqAnalysis at 51
  datar{chanindx}=preprocessing(cfgpreproc)

Trials are defined by 2 trigger beams, first trigger defines the start 
of the trial, and 2nd trigger beam: the reward time (which is variable). 
I'm taking smaples in this way: prestimbeam: 3 sec before "start 
trigger", and poststimbeam = time till trigger of reward. I pretty sure 
this error appears when prestimbeam is overlapping with the  previous 
poststimbeam (actually, taking  2sec before start trigger error doesn't 
come up).   Do you have any suggestion of how i could introduce i 
conditional statement for skipping these trials?  I guess this statement 
has to be written is "read_data" function, right?
Thanks!
Natalia Grion

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.



More information about the fieldtrip mailing list