<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
{margin-top:0;
margin-bottom:0}
p
{margin-top:0;
margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Dear Fieldtripers<br>
Sometime ago I wrote for myself a function that was computing PLV and some related non parametric statistics.<br>
(Phase Locking Value as define as the mean across trials of the phase angle difference recorded at two loci ; based on Lachaux et al., 1999, HBM).<br>
I implemented PLV in matlab using the following formula:<br>
<i><font color="0000FF">plv = squeeze(abs(mean(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)) ...<br>
-angle(data.fourierspctrm(:,cmb(2),:,:)))),1)));</font></i><br>
with cmb(1) and cmb(2) being the indices of the electrodes of interest (between which PLV is computed).<br>
I compared my results with the ft_connectivityanalysis function from Fieldtrip and the results were exactly the same.<br>
So far so good.<br>
<br>
But I recently went back to my code, and I was a little bit confused.<br>
Since I was dealing with angles, I though that the best way to do the subtraction should be done in the complex plane<br>
Like:<br>
<i><font color="0000FF">plv = squeeze(abs(mean(exp(1i*(angle(exp(1i*(angle(data.fourierspctrm(:,cmb(1),:,:)))) ...<br>
</font> <font color="0000FF"> - exp(1i*(angle(data.fourierspctrm(:,cmb(2),:,:))))))),1)));</font></i><br>
(for instance if the two angles: pi/2 and -pi/2 the direct subtraction will give pi,<br>
whereas in the complex plan it will be pi/2 - with the norm x2).<br>
<br>
The result I got with this code is obviously different from the previous one, and what I got from Fieldtrip.<br>
I went back to the archive of the mailing list but didn't find a clear answer to my point. Does anyone can enlighten me ?<br>
Thanks !<br>
<br>
Manuel<br>
<br>
<div><br>
</div>
</div>
</div>
</div>
</body>
</html>