combine covariance matrix estimates for epoched data

Dear all,

my data consist of 4 runs per session. I calculated the covariance matrix for epoched rawa data and want to average the covariance matrix over the 4 runs. Usually this should work with --gcov.

The problem is that in some runs there are too few / no trials so that no covariance matrix is calculated. E.g., I might have covariance matrixes from run 1 to 3 but not from 4. Then no grand average covariance matrix file is calculated.

How can I average over the covariance matrices "by hand"?

Would be very thankful if somebody could answer soon.

Cheers,

Hermine

Dear Hermine,

You can just run mne_process_raw again with run 4 left out.

- Matti

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20081009/28562aa0/attachment.html

Dear Matti,

but I have 12 subjects and 12 conditions - don't want to do it manually. Best would be a function where imputfiles are the cov files (per run, if it exists) and outputfile is the gcov file. Does something like this exist?

Cheers,

Hermine

-----Urspr?ngliche Nachricht-----

Dear Hermine,

Attached is a Matlab function for averaging covariance matrices.

- Matti

?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20081009/24757179/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: average_cov.m
Type: application/octet-stream
Size: 868 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20081009/24757179/attachment.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20081009/24757179/attachment-0001.html