<html><head></head><body bgcolor='#FFFFFF' style='font-size:12px;background-color:#FFFFFF;font-family:Verdana, Arial, sans-serif;'>Hi Davide,<br/><br/>would you mind sharing your solution (that could potentially help others as well)?<br/><br/>Thanks,<br/>Michael<br/><br/><br/><br/><blockquote style="border-left: 2px solid blue; margin-left: 5px; padding-left: 5px; padding-top: 5px;"><hr/><b>Von:</b> "Davide Rivolta" <drivolta81@gmail.com><br/><b>Gesendet:</b> Aug 5, 2011 11:36:07 AM<br/><b>An:</b> "Email discussion list for the FieldTrip project" <fieldtrip@donders.ru.nl><br/><b>Betreff:</b> Re: [FieldTrip] Potential bug in trl<br/><br/><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/> </div><div class="gmail_quote">On Fri, Aug 5, 2011 at 9:13 AM, "Jörn M. Horschig" <span><<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>></span> wrote:<br/><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div>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><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/> </div><div class="gmail_quote">On Thu, Aug 4, 2011 at 3:55 PM, Michael Wibral <span><<a href="mailto:michael.wibral@web.de">michael.wibral@web.de</a>></span> wrote:<br/><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div style="background-color: rgb(255, 255, 255); font-family: Verdana,Arial,sans-serif; font-size: 12px;">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: 2px solid blue; padding-left: 5px; margin-left: 5px; padding-top: 5px;"><hr/><b>Von:</b> "Davide Rivolta" <<a href="mailto:drivolta81@gmail.com">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">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">fieldtrip@donders.ru.nl</a><br/><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></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">fieldtrip@donders.ru.nl</a>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre><fieldset/><fieldset/></blockquote><br/> </div></div><pre>-- 
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">jm.horschig@donders.ru.nl</a>
Tel:    <a href="#">+31-(0)24-36-68493</a>
Web: <a href="http://www.ru.nl/donders">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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br/><br clear="all"/><br/>--<br/>Davide Rivolta, PhD<br/> </blockquote></body></html>