<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Lucie,<div><br></div><div>Yes, indeed this has recently been changed. The logic behind it is the following:</div><div><br></div><div>One either typically wants to keep the individuals, OR the average.</div><div><br></div><div>If in your case you need the average, you have to specify cfg.keepindividual = 'no';</div><div><br></div><div>Keeping both the average and the individual leads to an inconsistent definition of the data structure.</div><div>The field 'dimord' does not allow for an unequivocal interpretation of both indidual and avg are present.</div><div><br></div><div>If you need both the individual, and the avg, you now need to run ft_timelockgrandaverage twice, once with cfg.keepinididual = 'yes', and once with cfg.keepindividual = 'no';</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Feb 10, 2011, at 11:58 AM, Lucie Charles wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello everyone, <br><br>It seems that there has been a modification of ft_timelockgrandaverage : now if you specify cfg.keepindividual = 'yes', the grandaverage is computed but is not included in the output of the function (see above).<br> <br>Why is that ? Many of my scripts rely on this option and I wanted to know if there was a good reason for it.<br><br>Thanks, <br><br>Lucie <br><br>New version of ft_timelockgrandaverage (downloaded yesterday), line 159-176<br> <br>%--------------------------------------------<br>% % collect the results<br>%--------------------------------------------<br><br>grandavg           = [];<br>grandavg.label     = cfg.channel;       % cell-array<br> %grandavg.fsample   = varargin{1}.fsample; % fsample is obsolete<br>grandavg.time      = ResultsTime;       % 1 x Nsamples<br><br>%KEEP INDIVIDUAL MEANS?<br>if strcmp(cfg.keepindividual, 'yes')<br><b>  grandavg.individual = avgmat;         % Nsubj x Nchan x Nsamples<br>   grandavg.dimord = 'subj_chan_time';</b><br>else<br><b>  grandavg.avg    = ResultGrandavg;     % Nchan x Nsamples</b><br>  grandavg.var    = ResultVar;          % Nchan x Nsamples<br>  grandavg.dimord = 'chan_time';<br> end<br><br>Older version of ft_timelockgrandaverage (april 2010)<br><br>%--------------------------------------------<br>% % collect the results<br>%--------------------------------------------<br><br>%SWITCH CHANNEL TO LABEL?<br> grandavg.label     = cfg.channel;       % cell-array<br> grandavg.fsample   = varargin{1}.fsample;<br>grandavg.avg       = ResultGrandavg;        % Nchan x Nsamples<br>grandavg.var       = ResultVar;           % Nchan x Nsamples<br>grandavg.time      = ResultsTime;       % 1 x Nsamples<br> <br>%KEEP INDIVIDUAL MEANS?<br>if strcmp(cfg.keepindividual, 'yes')<br>  grandavg.individual = avgmat;         % Nsubj x Nchan x Nsamples<br>  grandavg.dimord = 'subj_chan_time';<br>else<br>  grandavg.dimord = 'chan_time';<br> end<br><br clear="all"><br>-- <br>Lucie CHARLES<br><br>INSERM-CEA Cognitive Neuroimaging unit<br><br>CEA/SAC/DSV/DRM/NeuroSpin<br>Bāt 145, Point Courrier 156<br>F-91191 Gif/Yvette, FRANCE<br>Tel : +33 1 69 08 99 74<br>Fax : +33 1 69 08 79 73<br> _______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>