<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div>Hello Dear Fieldtrip users,</div><div><br></div><div>I have an EEG signal which I want to do artifact rejection on it.</div><div>I've recorded the EEG during watching a video clip. <br></div><div>My signal is 100 seconds and I've selected 50 seconds.</div><div>I can find EOG artifact but I can't reject it. </div>Would you please let me know how can I do it.<div><br></div><div><br></div><div><br></div><div>cfg = [];<br>cfg.dataset = 'myfile.eeg'; %BrainVision Recoreder EEG<br><br>cfg.trialdef.triallength = inf;<br>cfg.trialdef.ntrials = inf;<br><div>cfg = ft_definetrial(cfg); </div><div>trl = cfg.trl;<br>data_org = ft_preprocessing(cfg);</div><div><br></div><div><br></div></div><div>%Select 30sec of data<br>cfg.latency = 'all';<br>cfg.latency = [0 30]; %start point and end point<br>cfg.avgovertime = 'no';<br>cfg.nanmean = 'no';<br><div>data_s = ft_selectdata(cfg, data_org);</div><div><br></div><div>[cfg, artifact] = ft_artifact_eog(cfg,data_s);</div><div>clean_data = ft_rejectartifact(cfg,data_s);<br></div></div></div></body></html>