<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,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Dear experts, </p>
<p><br>
</p>
<p>I have continuous EEG data in EDF format that does not include trigger channel. These EEG data was recorded as EEG-fMRI during a task (30-sec baseline and 30-sec active trial alternated 4 or 5 times depending on participants). I would like to segment out
 the active states 4 x 30-sec segments for each participants. Now, I have the separate marker files that have 2 sec TR trigger as a text (EV2) file. I can at least tell start  and finish for each trial from the marker file. I have tired to use ft_definetrial
 and ft_redefinetri with function of cfg.toilim = [tmin tmax] but I am getting error message either:<span style="font-family: Courier; font-size: 10px;"></span></p>
<p>1. undefined function or variable 'data' </p>
<p>2. <span style="font-size: 12pt;">Error using ft_notification (line 314)</span></p>
<p>This function requires raw+comp or raw data as input.</p>
<p><br>
</p>
<p>Error in ft_error (line 39)</p>
<p>  ft_notification(varargin{:});</p>
<p><br>
</p>
<p>Error in ft_checkdata (line 495)</p>
<p>    ft_error('This function requires %s data as input.', str);</p>
<p><br>
</p>
<p>Error in ft_redefinetrial (line 117)</p>
<p>data = ft_checkdata(data, 'datatype', {'raw+comp', 'raw'}, 'feedback', cfg.feedback);</p>
<p><br>
</p>
<p>I tried to refer the <a href="http://www.fieldtriptoolbox.org/reference/ft_definetrial" class="OWAAutoLink" id="LPlnk733228" previewremoved="true">http://www.fieldtriptoolbox.org/reference/ft_definetrial</a> and also searched through the mailing archives
 but I have not found exact solution so fat. </p>
<p>but I ma not really succeeding this. I am sure I am missing a lot of functions for that. Could you please kindly suggest any detailed explanation and solution for this?</p>
<p><br>
</p>
<p>Thank you very much for your kind help in advance,</p>
<p><br>
</p>
<p>Sincerely,</p>
<p><br>
</p>
<p>Hisako</p>
</div>
</body>
</html>