[Eeglablist] remove entire rows from EEG.event

Clemens DICKHUT clemens.dickhut at uni.lu
Sat Mar 26 05:36:46 PDT 2016


Hi all,

I’d like to remove rows in EEG.event that I don’t need.

Is there a straight forward way to delete rows in a struct array with fields, depending on a particular field entry?
I tried the following:

for b = 1:length(EEG.event)



         if strcmp(EEG.event(b).type, 'boundary')
            EEG.event(b) = [];
         elseif strcmp(EEG.event(b).type, 'R  1')
            EEG.event(b) = [];
         end



end



Putting a for loop around it doesn’t help much as b exceeds the new EEG.event length at some point...

Hope someone can help. Thanks a lot in advance.

Best,
Clemens



__________________________________
Clemens Dickhut, M.Sc., (PhD Student)
Institute for Health and Behaviour
Research Unit INSIDE
University of Luxembourg - Campus Belval
Maison des Sciences Humaines
11, Porte des Sciences, R. 04 415
L-4366 Esch-sur-Alzette
Tel.: (+352) 46 66 44 9536



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160326/fa89c1b3/attachment.html>


More information about the eeglablist mailing list