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>