<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Thanks a lot Eelke!</p>
<p>I will try immediately and let you know..</p>
<p>Is it the case all the time when using ft_redefinetrials? That one gets errors when trying to average those data?</p>
<p>I hope that's the same causing the problems in the source grandaverage, but I do think so since it doesn't occur if computing the datasets with a different 'trial fun' and not using redefinetrial...</p>
<p><br>
</p>
<p><br>
</p>
<p>Keep you posted thanks again!!!</p>
<p><br>
</p>
<p>Cecilia</p>
<p><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p><span style="font-size:10pt; color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif">Cecilia Mazzetti, </span><span style="font-size:10pt; font-family:Arial,Helvetica,sans-serif; color:rgb(0,0,0)">Postdoc Researcher</span></p>
<span style="font-family:Arial,Helvetica,sans-serif; font-size:10pt; color:rgb(0,0,0)"></span>
<p><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt">Faculté de médecine</span><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt"> de </span><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt">l'Université</span><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt"> de </span><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt">Genève</span></p>
<span style="font-family:Arial,Helvetica,sans-serif; font-size:10pt; color:rgb(0,0,0)"></span>
<p><span style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:11pt"><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt">Chemin des Mines 9, 1202 Genève</span><br>
<span style="font-family:Arial,Helvetica,sans-serif; font-size:10pt; color:rgb(0,0,0)"></span></span></p>
<span style="font-family:Arial,Helvetica,sans-serif; font-size:10pt; color:rgb(0,0,0)"></span>
<p><span style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:11pt"><span style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:10pt">+41 2237 90992</span></span></p>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Eelke Spaak <e.spaak@donders.ru.nl><br>
<b>Sent:</b> Wednesday, October 7, 2020 2:57:52 PM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] ft_redefinetrials and problems with selecting data afterwards, and averaging</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Cecilia,<br>
<br>
It might help to manually change the time axes for the response-locked<br>
data to something that matches the baseline data (provided the<br>
segments are of equal length). (E.g. dat_resp.time = dat_cue.time; or<br>
something similar.)<br>
<br>
Cheers,<br>
Eelke<br>
<br>
On Tue, 6 Oct 2020 at 17:58, Cécilia Mazzetti <Cecilia.Mazzetti@unige.ch> wrote:<br>
><br>
> Hello  everyone,<br>
><br>
> I keep having this problem and not being able to solve it.<br>
><br>
> Main goal is to do a source analysis of some data, the baseline is cue locked, while the active window is response locked.<br>
><br>
><br>
> When determining the active window, I use redefinetrial (with offset as only parameter) to create the epochs response locked.<br>
><br>
> This works, but when I try and select some data from this response locked ones, FT gives me an error:<br>
><br>
><br>
> Error using  <<br>
><br>
> Matrix dimensions must agree.<br>
><br>
> Error in ft_selectdata>getselection_time (line 981)<br>
><br>
>   if all(cfg.latency<mintime) || all(cfg.latency>maxtime)<br>
><br>
> Error in ft_selectdata (line 279)<br>
><br>
> if hastime,    [seltime,    cfg] = getselection_time   (cfg, varargin{:}, cfg.tolerance, cfg.select); end<br>
><br>
><br>
><br>
><br>
> Also if computing common filters from cue locked and response locked (baseline and active windows) data, I eventually get a vector of zeroes in the avg.pow field when grand averaging the conditions<br>
><br>
><br>
><br>
> pow: [6426x0 double]<br>
><br>
><br>
><br>
><br>
> maybe some problem in the averaging occurs because of redefine trials?<br>
><br>
><br>
><br>
><br>
> Thanks in advance to whoever will help!!!<br>
><br>
><br>
><br>
><br>
><br>
><br>
> Cecilia Mazzetti, Postdoc Researcher<br>
><br>
> Faculté de médecine de l'Université de Genève<br>
><br>
> Chemin des Mines 9, 1202 Genève<br>
><br>
> +41 2237 90992<br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
> <a href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</span></font>
</body>
</html>