<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hello Fieldtrip community!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I want to do TFR analysis on datasets with trials with different lengths (as I'm analysing the time period from the onset of a stimulus until participant's response, which differs from trial to trial).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">These are the parameters:</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>cfgft                   = [];</div>
<div>cfgft.method    = 'tfr';</div>
<div>cfgft.output      = 'pow';</div>
<div>cfgft.foi              = exp(linspace(log(2),log(45),50));</div>
<div><b>cfgft.toi              = [];</b></div>
<div>cfgft.width         = 6;</div>
<div>cfgft.keeptrials  = 'yes';</div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0">The result I get from the freqanalysis (powspctrm) is a
<b>trial x chan x freq x time </b>matrix, in which the <b>time </b>is the time of the trial with the largest duration. The datapoints of the trials with smaller durations are filled with zeros.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I would prefer to get the powspctrm without the zeros at the end, but maybe I can just exclude them later on from the analysis?</p>
<p style="margin-top:0;margin-bottom:0">Do you know <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
if Fieldtrip works fine with trials of different durations? And </span>if there is any other more efficient way to analyse trials with different durations?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Any help would be extremely appreciated, t<span style="font-size: 12pt;">hanks so much in advance!</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best wishes,</p>
<p style="margin-top:0;margin-bottom:0">Ioanna</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
</body>
</html>