<div dir="ltr">I see now you wrote 8 sessions with the same subject. You could make a loop that conceptually looks like this:<div><br></div><div>for s = 1:numsessions</div><div><br></div><div>cfg = ft_definetrial(cfg);</div><div>data{s} = ft_preprocessing(cfg);<br></div><div><br></div><div>end</div><div>data_all = ft_appenddata([], data{:});</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-10 16:15 GMT-08:00 Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Max,<div><br></div><div>See these pages and judge for yourself:</div><div><a href="http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data" target="_blank">http://www.fieldtriptoolbox.org/example/getting_started_with_reading_raw_eeg_or_meg_data</a><br></div><div><a href="http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition" target="_blank">http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition</a><br></div><div><br></div><div>If your trials are defined as x1 time before a certain trigger until x2 time after, it's very easy. If it's slightly more complicated, then check that second page. In short, the idea there is to make ft_definetrial call a tailormade trial function (cfg.trialfun). The good news is that if the triggers and trials are the same for each subject, you only have to make one function.</div><div><br></div><div>Hope that gets you started,</div><div>Arjen</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2016-02-10 16:03 GMT-08:00 Max Cantor <span dir="ltr"><<a href="mailto:Max.Cantor@colorado.edu" target="_blank">Max.Cantor@colorado.edu</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi fieldtrip community,<div><br></div><div>I'm trying to use ft_definetrial to create a trial definition from 8 datasets, recorded back-to-back from a subject, and then use ft_redefinetrial with that trial definition and raw data that was concatenated in eeglab and converted to a fieldtrip structure using eeglab2fieldtrip. Is this feasible in a relatively straightforward way, or would I be better off doing the epoching in eeglab as well before converting back to fieldtrip?<br><br>On a side note, I chose to concatenate the data in eeglab because I could not figure out a convenient way to do so in fieldtrip. I know there is ft_appenddata, but as best as I can tell this is meant to be used after epoching, and the sample information was not being concatenated (or at least not properly), which was creating problems down the line with artifact rejection in my pipeline. Maybe there was some other way to do this properly in fieldtrip that I had not considered in the first place.</div><div><br></div><div>Best,</div><div><br></div><div>Max</div><span><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr"><div style="font-size:small"><div>Max Cantor<br></div>Graduate Student</div><div style="font-size:small">Cognitive Neuroscience of Language Lab</div><span style="font-size:small">University of Colorado Boulder</span><br></div></div>
</div></font></span></div>
<br></div></div>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</blockquote></div><br></div>