[FieldTrip] computing the covariance matrix from trials with different lengths

Frederic Roux fredericroux at hotmail.de
Fri May 4 16:21:43 CEST 2012


Dear all,

I want to do a beamforming analysis using the LCMV beamformer on MEG resting state activity.

After the artifcat rejection, my data is chopped into trials of
different lengths.

My question is related as to how to compute the covariance matrix.

If I use

cfg = [];
cfg.vartrllength = 2;

cov = ft_timelockanalysis(cfg,data);

a covariance matrix will be computed for each trial while padding all the segments that are smaller than the longest segment with zeros.
I believe that in the end the average covariance matrix across the trials is used. Am I correct?

Another alternative would be to chop all the trials into epochs of the same length, ie 2 seconds.
cfg = [];
cfg.trllength = 2;

data = ft_redefinetrial(cfg,data);

cfg = [];

cfg.vartrllength = 0;



cov = ft_timelockanalysis(cfg,data);

Finally, one could also concatenate all the trials into one long epoch and run the same code.

I would be curious to know what the differences would be regarding the computation of the covariance matrix
and which would be the most appropriate way to do this.

Any suggestions, help or comments would be highly appreciated.

Best, Fred
-- 
Frédéric Roux, PhD student
Department of Neurophysiology
Max Planck Institute for Brain Research
D-60529 Frankfurt am Main
Frederic.Roux at brain.mpg.de
+49(0)69630183225


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120504/8f524cd4/attachment-0001.html>


More information about the fieldtrip mailing list