<div>Dear Jörn,</div>
<div> </div>
<div>Thank you for your reply. I guess I have now figured it out.</div>
<div> </div>
<div> </div>
<div>Thanks,</div>
<div>Davide<br><br></div>
<div class="gmail_quote">On Fri, Aug 5, 2011 at 9:13 AM, "Jörn M. Horschig" <span dir="ltr"><<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div text="#000000" bgcolor="#FFFFFF">Dear Davide,<br><br>I never worked with trials of different length, however this should be straight forward when writing your own trialfun (just as Michael proposed). <br>In most trialfuns, the trl matrix is constructed by concatenating the vectors begsample, endsample and offset. These vectors can have any values you want them to have. As a simple example, you can write a trialfun that just returns trl = [1 2 1; 400 500 100] (for your experiment, you of course want these values to be computed from your trigger values). <br>
Is your problem that such a thing does not work? It would be great if you give a concrete use-case, or e.g. attach your trialfun.<br><br>Best,<br>Jörn
<div>
<div></div>
<div class="h5"><br><br>On 8/4/2011 4:03 PM, Davide Rivolta wrote:
<blockquote type="cite">
<div>Thanks Michael,</div>
<div> </div>
<div> I wrote my own trialfun.</div>
<div> </div>
<div> The offset would be negative and would have the same lenght of difference between endsample-begsample. This, for each trial, would have a different value.</div>
<div> </div>
<div>It can be a bug. In fact, I tried to vhange the trialfun by leaving the same begsample and endsample, but I put a fixed offset (i.e., -100) and it worked. All the trial was in and not, like with the variable offset, until time = 0.</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Davide<br><br></div>
<div class="gmail_quote">On Thu, Aug 4, 2011 at 3:55 PM, Michael Wibral <span dir="ltr"><<a href="mailto:michael.wibral@web.de" target="_blank">michael.wibral@web.de</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div style="BACKGROUND-COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, sans-serif; FONT-SIZE: 12px" bgcolor="#FFFFFF">Hi davide,<br><br>I guess in such a case you would have to write your own trial function. However, offset values larger than 0 mean, that the stimulus occured before you start your piece of data - is that really what you wanted ?<br>
<br>Michael<br><br><br>
<blockquote style="BORDER-LEFT: blue 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; PADDING-TOP: 5px">
<hr>
<b>Von:</b> "Davide Rivolta" <<a href="mailto:drivolta81@gmail.com" target="_blank">drivolta81@gmail.com</a>><br><b>Gesendet:</b> Aug 4, 2011 2:44:08 PM<br><b>An:</b> <a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<b>Betreff:</b> [FieldTrip] Potential bug in trl
<div>
<div><br><br>
<div>Dear all,</div>
<div> </div>
<div>I have noticed that the trial definition works well when begsample, ensample and offset have fixed values.</div>
<div> </div>
<div>I have however a specific trialfunction, where each trial has a different lenght.</div>
<div> </div>
<div>This works well when you specify a fixed offset, however, when even the offset has to change for each trial, Fieldtrip reports values until 0. It ignores time after 0.</div>
<div> </div>
<div> </div>
<div>Might it be a bug?</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Davide</div></div></div></blockquote></div><br>_______________________________________________<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" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Davide Rivolta, PhD<br><br><br>
<fieldset></fieldset> <br><pre>_______________________________________________
fieldtrip mailing list
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre></blockquote><br><br></div></div><pre cols="72">--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>
Tel: <a href="tel:%2B31-%280%2924-36-68493" target="_blank" value="+31243668493">+31-(0)24-36-68493</a>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre></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" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Davide Rivolta, PhD<br><br>