<div dir="ltr"><br clear="all">
<p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">Dear all,</span></p>
<p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">I want to compute the intertrial phase coherence and its variation
across trials with a one taper hanning approach as in</span></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US"> </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg = [];</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US"> </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.output = 'fourier';</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.channel = 'all';</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.method = 'mtmconvol';</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.taper = 'hanning';</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.foi = 5:2:80;</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.t_ftimwin = 5./cfg.foi; </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.tapsmofrq = 0.4*cfg.foi; </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.toi = time_vect;</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.pad = 'maxperlen'; </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">cfg.keeptrials = 'yes';</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">% cfg.keeptapers = 'no';</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">freqscprm = ft_freqanalysis(cfg, data);</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">tmpdat = freqscprm.fourierspctrm;</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US"> </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">tmpdat = tmpdat./abs(tmpdat);</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US">itc = abs(mean(tmpdat)); </span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US"> </span></i></p>
<p class="MsoNormal" style="text-autospace:none"><span style lang="EN-US"> </span></p>
<p class="MsoNormal"><span style lang="EN-US">Nevertheless,
the option </span><i><span style="font-size:12pt" lang="EN-US">cfg.keeptrials = 'yes'; </span></i><span style lang="EN-US">does not seem to be applied and the output is already the average across
trials, e.g. of size nfreq x ntimepoints and not of size ntrials x nfreq
x ntimepoints as I would have expected due to the settings for </span><i><span style="font-size:12pt" lang="EN-US">cfg.keeptrials.</span></i></p>
<p class="MsoNormal"><i><span style="font-size:12pt" lang="EN-US"> </span></i></p>
<p class="MsoNormal"><span style lang="EN-US">Can anyone
suggest me how to manage the configuration in order to have estimates in each
trial as an output?</span></p>
<p class="MsoNormal"><span style lang="EN-US"> </span></p>
<p class="MsoNormal"><span style lang="EN-US">Thanks,</span></p>
<p class="MsoNormal"><span style lang="EN-US">Laura</span></p>
<br>-- <br><div class="gmail_signature">Laura Marzetti, PhD <br>Istituto di Tecnologie Avanzate Biomediche<br>Università di Chieti "G. D'Annunzio"<br>Via dei Vestini - Campus Universitario<br>66013 Chieti - ITALY<br> <br>phone: 0039-0871-3556944<br>fax: 0039-0871-3556930</div>
</div>