[Eeglablist] Difference wave calculation: disparity in pop_comperp and matlab calculations

n.johnstone at surrey.ac.uk n.johnstone at surrey.ac.uk
Fri Jul 1 04:54:40 PDT 2016


Dear list,

When calculating difference waves, I have found that when using pop_comperp the graph output differs from when I perform a subtraction in Matlab:
ERP1 = mean(EEG.data,3);
ERP2 = mean(EEG.data,3);
Difference_ERP = ERP1 - ERP2 ;
And plot this in a Matlab figure.

The values are always larger in the Matlab figure, and look less like the difference ERP I'd expect, whereas the result of pop_comperp looks much more reasonable, as are the values. I've examined the pop_comperp function and it seems to apply the same subtraction processes as the Matlab command line subtraction - so I cannot figure out why there'd be a disparity in results.
I'd like to be able to extract data from these difference waves using Matlab for statistical analyses, but I'd like to understand why these results diverge in the first instance.
Can anyone offer an explanation for why there's a 'difference' in my difference waves?

Best,
Nicola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160701/99b4b0f1/attachment.html>


More information about the eeglablist mailing list