[FieldTrip] What is the data present in the covariance matrix after using ft_timelockanalysis

Soujata Borbaruah s.borbaruah at student.utwente.nl
Thu Jun 16 16:19:12 CEST 2016


Hello,

I want to calculate the covariance of the data I provide. In the function ft_timelockanalysis there is a portion where the covariance is being normalised over all trials by the total number of samples in all trials.


% normalize the covariance over all trials by the total number of samples in all trials
if strcmp(cfg.covariance, 'yes')
  if strcmp(cfg.keeptrials,'yes')
    for i=1:ntrial
      if strcmp(cfg.removemean, 'yes')
        covsig(i,:,:) = covsig(i,:,:) / (numcovsigsamples(i)-1);
      else
        covsig(i,:,:) = covsig(i,:,:) / numcovsigsamples(i);
      end
    end
  else
    if strcmp(cfg.removemean, 'yes')
      covsig = squeeze(nansum(covsig, 1)) / (sum(numcovsigsamples)-ntrial);
    else
      covsig = squeeze(nansum(covsig, 1)) / sum(numcovsigsamples);

    end
  end
end

Please note that the cfg.removemean was selected as yes.

Can someone please explain what is the final data present in my covariance matrix?



Sent with MailTrack<https://mailtrack.io/install?source=signature&lang=en&referral=s.borbaruah@student.utwente.nl&idSignature=22>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160616/68f3d5da/attachment.html>


More information about the fieldtrip mailing list