<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jay,<div><br></div><div>I think the best you could get in terms of script would be the one from the tutorial. If it does not work for you, could you specify what causes you to get stuck exactly?</div><div><br></div><div>Best,</div><div>Jan-Mathijs</div><div><br><div><div>On Jan 21, 2014, at 10:20 AM, Jay Hegdé wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Eelke,<br><br>Thank you very much.  But I'm afraid this doesn't solve my problem.  My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in <a href="http://fieldtrip.fcdonders.nl">http://fieldtrip.fcdonders.nl</a>/example.) So in this case, one script would be worth a thousand words for me.<br><br>Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share?<br><br>Best,<br>Jay<br><br>On 1/21/2014 3:30 AM, Eelke Spaak wrote:<br><blockquote type="cite">Hi Jay,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the<br></blockquote><blockquote type="cite">begin and end sample, and the 'offset' (shift in time axis to<br></blockquote><blockquote type="cite">determine t=0; offset=0 means begin sample will be t=0).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In typical cognitive experiments, such a matrix is generated by a call<br></blockquote><blockquote type="cite">to ft_definetrial, which in turn calls either a user-specified<br></blockquote><blockquote type="cite">"trialfun" to find events of interest in the data (recorded in a<br></blockquote><blockquote type="cite">trigger channel), or ft_trialfun_general. ft_trialfun_general is a<br></blockquote><blockquote type="cite">simple trialfun that looks for specified event values in a specified<br></blockquote><blockquote type="cite">trigger channel, and creates trials spanning from X seconds before the<br></blockquote><blockquote type="cite">event to Y seconds after the event. For using ft_definetrial, see this<br></blockquote><blockquote type="cite">tutorial: <a href="http://fieldtrip.fcdonders.nl/tutorial/preprocessing">http://fieldtrip.fcdonders.nl/tutorial/preprocessing</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If for any reason (e.g. you don't have triggers) you don't want to use<br></blockquote><blockquote type="cite">ft_definetrial, you can simply create a trl matrix yourself by<br></blockquote><blockquote type="cite">specifying the sample indices and offset.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Best,<br></blockquote><blockquote type="cite">Eelke<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 21 January 2014 02:30, Jay Hegdé <<a href="mailto:jhegde@gru.edu">jhegde@gru.edu</a>> wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Everyone,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'd like to use FieldTrip for the joint analysis of spike and local field<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">potential (LFP) data.  I'm proficient in Matlab, but very new to FieldTrip.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm trying to write a script by precisely following the relevant tutorial<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(<a href="http://fieldtrip.fcdonders.nl/tutorial/spikefield">http://fieldtrip.fcdonders.nl/tutorial/spikefield</a>). Everything goes OK for<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the first couple of steps, but I'm getting stuck when it comes to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">constructing "a cfg.trl matrix to preprocess the LFP data" described in the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tutorial.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">So can anyone share an example script that actually runs and does this<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">analysis, so I can see what the tutorial is talking about?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thank you very much in advance,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Jay Hegdé<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Medical College of Georgia<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Georgia Regents University<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Augusta, GA, USA<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">fieldtrip mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">fieldtrip mailing list<br></blockquote><blockquote type="cite"><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br></blockquote><blockquote type="cite"><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></body></html>