<div dir="ltr">Dear all,<div><br></div><div>I would like to automatically remove trials in which the min or max of the signal exceeds 100 uv/T. So I am planning to use the ft_artifact_threshold on the preprocessed data.</div><div><br></div><div>After running the following code</div><div><br></div><div><div>cfg = [];</div><div>cfg.continuous = 'no';</div><div>cfg.trl = 'dataRejBrows.sampleinfo';                     <i> %I am not sure how to specify the cfg.trl since I already have the epochs I am interested in; someone on the mailing list has suggested earlier to use the .sampleinfo parameter.</i></div><div>cfg.artfctdef.threshold.min       = -100;</div><div>cfg.artfctdef.threshold.max       =  100;</div><div>[cfg, artifact] = ft_artifact_threshold(cfg, dataRejBrows);</div></div><div><br></div><div>I get the following error message:</div><div><br></div><div><div><div>Index exceeds matrix dimensions.</div><div><br></div><div>Error in ft_artifact_threshold (line 149)</div><div>    dat = ft_fetch_data(data,        'header', hdr, 'begsample', cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2),</div><div>    'chanindx', channelindx, 'checkboundary', strcmp(cfg.continuous, 'no'));</div><div><br></div><div>Error in reject_artifacts (line 59)</div><div>[cfg, withinhundred] = ft_artifact_threshold(cfg, dataAllRight);</div></div></div><div><br></div><div>I will appreciate any suggestions on how to proceed with this function!</div><div><br></div><div>Kind regards,</div><div>Yanina</div><div><br></div><div><br></div></div>