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

Mikołaj Magnuski mmagnuski at swps.edu.pl
Fri Jul 1 18:07:26 PDT 2016


Hi Nicola,

could you post an example of the differences?
Also - you are probably doing something else than the code you pasted
because here:

ERP1 = mean(EEG.data,3);
ERP2 = mean(EEG.data,3);
Difference_ERP = ERP1 – ERP2 ;

ERP1 and ERP2 are the same.

pop_comperp may be doing additional filtering (but if I remember correctly
it should only do so if asked).
​

2016-07-01 13:54 GMT+02:00 <n.johnstone at surrey.ac.uk>:

> 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
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>

-- 

------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160702/a19eca6b/attachment.html>


More information about the eeglablist mailing list