<div dir="ltr"><br><div style>Dear <span name="Eelke Spaak" class="" style="font-size:14px;font-family:arial,sans-serif">Eelke Spaak</span><span style="font-family:arial,sans-serif;font-size:14px;white-space:nowrap"> </span></div>
<div style><span style="font-family:arial,sans-serif;font-size:14px;white-space:nowrap"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:14px;white-space:nowrap">Thank you very much.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:14px;white-space:nowrap">It works perfect!</span></div><div style><span style="font-family:arial,sans-serif;font-size:14px;white-space:nowrap"><br></span></div>
<div style><span style="font-family:arial,sans-serif;font-size:14px;white-space:nowrap">Best regards.</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/16 Eelke Spaak <span dir="ltr"><<a href="mailto:eelke.spaak@donders.ru.nl" target="_blank">eelke.spaak@donders.ru.nl</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear BeomJun,<br>
<br>
What you describe is definitely possible. If you specify:<br>
<br>
cfg = [];<br>
cfg.dataset = 'dataset';<br>
data = ft_preprocessing(cfg);<br>
<br>
you will get one very big 'trial' in the data structure, representing<br>
just all your data. In the step above, you can also specify filter<br>
options.<br>
<br>
After this step, you can segment your data into trials by using<br>
ft_redefinetrial (rather than ft_definetrial). However, you still need<br>
a trl matrix containing the trial definition. The easiest way to<br>
obtain this is to still call ft_definetrial as you used to do:<br>
<br>
cfg = [];<br>
cfg.dataset = 'dataset';<br>
cfg.trialdef.....<br>
% all the trial definition options go here<br>
cfgout = ft_definetrial(cfg);<br>
<br>
and then just save the output trl matrix:<br>
<br>
trl = cfgout.trl;<br>
<br>
now you can call ft_redefinetrial:<br>
<br>
cfg = [];<br>
cfg.trl = trl;<br>
data = ft_redefinetrial(cfg, data);<br>
<br>
and your data will be segmented.<br>
<br>
Hope this helps,<br>
Best,<br>
<br>
Eelke<br>
<div><div class="h5"><br>
<br>
On 16 May 2013 08:28, Beom Jun Min <<a href="mailto:mbj0310@gmail.com">mbj0310@gmail.com</a>> wrote:<br>
><br>
> Dear all,<br>
><br>
> Hello, my name is BJ Min from Korea.<br>
><br>
> I am just a beginner in the Fieldtrip.<br>
> Anyway, with the help of tutorials, I could make grand average ERP of my<br>
> data finally.<br>
><br>
> However, my question is about the order of preprocessing. According to the<br>
> tutorials, and examples, it looks the ft_definetrial step is the first, then<br>
> ft_preprocessing step is followed.  But, is there any method to flip these<br>
> two steps? What I want to do is preprocessing (filtering, notch filtering)<br>
> first then to use ft_definetrial sequentially.<br>
><br>
> Best regards<br>
><br>
><br>
> BeomJun Min, M.D.<br>
><br>
> Ph. D. student, Department of Medical System Engineering (DMSE)<br>
> Gwangju Institute of Science and Technology (GIST)<br>
> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju<br>
> 500-712, Republic of Korea (South)<br>
> Phone: +82-62-715-3266 / Fax: +82-62-715-3244<br>
> E-mail: <a href="mailto:mbj0310@gmail.com">mbj0310@gmail.com</a>, <a href="http://bmssa.gist.ac.kr" target="_blank">http://bmssa.gist.ac.kr</a><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="arial, helvetica, sans-serif">BeomJun Min, M.D.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div>
<font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);line-height:18px">Department of Medical System Engineering (DMSE)<br></span><span style="color:rgb(51,51,51);line-height:18px">Gwangju Institute of Science and Technology (GIST)</span><span style="color:rgb(51,51,51);line-height:18px"> </span><span style="color:rgb(51,51,51);line-height:18px"><br>
261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju <br>500-712, Republic of Korea (South) <br>Phone: +82-62-715-3266 / Fax: +82-62-715-3244 <br>E-mail: </span><a href="mailto:mbj0310@gmail.com" style="text-decoration:none;line-height:18px" target="_blank"><span>mbj0310@gmail.com</span></a><span style="color:rgb(51,51,51);line-height:18px">, <a href="http://bmssa.gist.ac.kr/" style="text-decoration:none" target="_blank">http://bmssa.gist.ac.kr</a></span></font><br>
</div></div>
</div>