<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Hi Fieldtrip community,<br>
<br>
I have a question regarding a tutorial on your Fieldtrip website (<a href="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_cleaning/__;!!HJOPV4FYYWzcc1jazlU!7IMAHz8WCuvGuqu4n9XXz-zA1TJdccWCrfrOSJnpA2Tisxo48IM-Lh9GuXFmOzqfdI0s84nj_FryUlXQJQhUq_KG6jUi9_9grw$">https://www.fieldtriptoolbox.org/workshop/madrid2019/tutorial_cleaning/</a>), specifically in the section on rejecting muscular and visual artifacts. When I use the provided code to reject segment
 artifacts from resting-state continuous data, the result is a new matrix of data that is no longer one trial, but rather contains multiple trials and times, depending on how many segments are rejected. If I try to make it continuous, there are NaN values in
 the place of the rejected sampling points.<br>
<br>
I was wondering how you handle this case. Do you work with the cleaned data that contains multiple trials and times, or do you do something else?<br>
<br>
The provided code is :<br>
<b>cfg = [];<br>
cfg.artfctdef.minaccepttim = 0.010;<br>
cfg.artfctdef.reject       = 'partial';<br>
if isfield(artif.artfctdef,'visual')<br>
    cfg.artfctdef.visual.artifact = artif.artfctdef.visual.artifact;<br>
end<br>
if isfield(artif.artfctdef,'muscle')<br>
    cfg.artfctdef.muscle.artifact = artif.artfctdef.muscle.artifact;<br>
end<br>
data = ft_rejectartifact(cfg, data);<br>
<br>
</b><br>
<br>
<br>
Many thanks<br>
<br>
Hasnae AGOURAM <br>
</div>
<br>
<p></p>
</div>
</body>
</html>