<div dir="ltr"><div dir="ltr"><div>Dear all,<br></div><div><br></div><div>I have pre-processed some ERP data in BrainVision and marked bad segments instead of removing them. I now want to import this data into Fieldtrip, but how do I remove the marked segments?</div><div><br></div><div>The following tells me that there are 10 bad segments out of 44, but when I set event type to 'Stimulus' and add the triggers at event values, it imports all 44 segments. <br></div><div><br></div><div>cfg = [];<br>cfg.dataset = '../data/export/28_preproc.dat';<br>cfg.trialdef.eventtype = 'Bad Interval'; <br></div><div>ft_definetrial(cfg);</div><div><br></div><div>Do I need to write my own conditional trialfun? If so, how? I've tried editing the tutorial example but I'm new to Matlab and am struggling.</div></div><div dir="ltr"><br></div><div>Thanks in advance,<br></div><div>Kate<br></div><div dir="ltr"><div><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span><font color="#888888"><div><div><div><div>Kate Stone<br></div>PhD candidate<br></div>Vasishth Lab | Department of Linguistics<br></div>Potsdam University, 14467 Potsdam, Germany<br></div><a href="https://auskate.github.io" target="_blank">https://auskate.github.io</a></font></span></div></div></div></div></div>