<div dir="ltr">Hi Mick,<div><br></div><div>I hope I understood your problem correctly in that you want to identify trials using a combination of successive triggers. If that's the case you're most likely to solve the problem using a custom built trial-function allowing you to identify trials using conditionals. An example can be found here: <a href="http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition">http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition</a></div><div><br></div><div>Best,</div><div>Thomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 2, 2015 at 6:02 PM, Mick Lehmann <span dir="ltr"><<a href="mailto:mick.lehmann@uzh.ch" target="_blank">mick.lehmann@uzh.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Fieldtrippers,<div><br></div><div>I’m using the script for reading data and I have a special issue at cfg.trialdef.eventvalue (see script below). The thing is that I have several triggers at the exact same position and I want to analyze only a subgroup of events which is defined by a combination of two trigggernames / evenvalues. Does anybody know how to define those trials, meaning how to create an event as a combination of two triggernames?</div><div><br></div><div>This is how the script looks like:</div><div><div style="margin:0px;font-size:10px;font-family:Courier">VP = dir(<span style="color:#b245f3">'*.dat'</span>);                                           </div><div style="margin:0px;font-size:10px;font-family:Courier">cfg = [];</div><div style="margin:0px;font-size:10px;font-family:Courier">cfg.dataset                 = (VP.name);    </div><p style="margin:0px;font-size:10px;font-family:Courier;color:rgb(37,153,45);min-height:12px"> <br></p><div style="margin:0px;font-size:10px;font-family:Courier">cfg.trialdef.eventtype      = <span style="color:#b245f3">'Comment'</span>;</div><div style="margin:0px;font-size:10px;font-family:Courier">cfg.trialdef.prestim        = 2;</div><div style="margin:0px;font-size:10px;font-family:Courier">cfg.trialdef.poststim       = 6;</div><p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px">      <br></p><div style="margin:0px"><span style="color:rgb(0,0,0);font-family:Courier;font-size:10px">cfg.trialdef.eventvalue     = {</span><font face="Courier" size="1" style="color:rgb(178,69,243)">'HitHitReakt</font><font color="#b245f3" face="Courier" size="1">’</font><font face="Courier" size="1"> '</font><span style="font-family:Courier;font-size:10px"><font color="#b245f3">Cue_N3_neg'</font></span><span style="color:rgb(0,0,0)"><font face="Courier" size="1">}; </font><font face="Courier" style="font-size:11px"><u>The events should be read only if both conditions are fulfilled</u></font></span></div><div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(4,51,255)"><br></div><div style="margin:0px;font-size:10px;font-family:Courier">cfg = ft_definetrial(cfg);</div><p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px"> <br></p><div style="margin:0px;font-size:10px;font-family:Courier">cfg.demean = <span style="color:#b245f3">'yes'</span>;</div><div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(37,153,45)"><br></div><div style="margin:0px;font-size:10px;font-family:Courier">dataHitHitReact = ft_preprocessing(cfg);</div><p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px"> <br></p><div style="margin:0px;font-size:10px;font-family:Courier">dataHitHitReact = renamechannels(dataHitHitReact);</div><p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px"> <br></p><div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(178,69,243)"><span style="color:#000000">save </span>dataHitHitReact_preproc<span style="color:#000000"> </span>dataHitHitReact</div><div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(4,51,255)"><br></div><div style="margin:0px;font-size:10px;font-family:Courier">    fprintf(<span style="color:#b245f3">'%s not found.\n'</span>,cfg.trialdef.eventvalue{1})</div><div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(4,51,255)"><br></div><div style="margin:0px;font-family:Courier;min-height:14px"><br></div></div><div><br></div><div>I'm deeply grateful for any help.</div><div><br></div><div>Thanks,</div><div>Mick<br><div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><br></div><div></div></div></div></div>
</div>
<br></div></div></div><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" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>