Print

Print


Dear Ryan,

For the mean across channels if you do:
D = spm_eeg_load
m = squeeze(mean(mean(D(D.indchannel({'Cz', 'Pz'}), D.indsample(0.5):D.indsample(0.9), :))));
save m.txt m -ascii

then there will be no warning. For looking at a single channel you can do:
D = spm_eeg_load
m = squeeze(mean(D(D.indchannel('Cz'), D.indsample(0.5):D.indsample(0.9), :), 2));
save m.txt m -ascii

Note that if you start looking at all the electrodes one by one then you should correct for multiple comparison across channels and then if you don't really have any prior hypothesis (unlike what you said before) it does make sense to go back to the SPM approach and compare scalp maps averaged over time, which might be more sensitive than Bonferroni correction across channels.

Best,

Vladimir


On Thu, May 7, 2015 at 6:50 PM, Ryan Blything <[log in to unmask]> wrote:
Dear Vladimir (Apologies for sending this twice, but I forgot to post to the main list last time):

Thank you for your response. I have one follow-up question about exporting data to excel.

I would like to try a traditional ERP analysis by exporting data for each individual electrode, averaged across a 500-900ms time-window, and for each individual trial (i.e., 64 x 1 x 200 [where 200 is No. trials]).

You previously gave me the following code:
D = spm_eeg_load
m = mean(mean(D(D.indchannel({'Cz', 'Pz'}), D.indsample(0.5):D.indsample(0.9), :)));
save m.txt m -ascii

This successfully gave me a 1 x 1 x 200 array where data is averaged across Cz&Pz, but I have not managed to adjust this to obtain data points for each electrode separately. Also, the code successfully gave me a m.txt file, but the m - ascii command produced the warning message "Attempt to write an unsupported data type to an ASCII file" - do you have any idea why this might be? And is it still appropriate to use the m.txt file despite that warning message?

Thank you very much,
Ryan