[Eeglablist] Inter-electrode distances

Arnaud Delorme arno at ucsd.edu
Thu Oct 7 20:31:30 PDT 2010

```Hi Paul,

what you probably want is the distance on the scalp of the electrodes. Assuming a spherical model, for this you have to get the angle between the two vectors pointing to each electrodes from the center of then head the multiply by the radius of the sphere to get the distance on the sphere. I would simply do the dot product of the 3-D Cartesian coordinates of each vector, then compute the angle using argcos (inverse cosine function) (divide by the dot product by the length of the two vector then do the argcos function), then compute angle (in radian) times radius to get the distance.

I have not tried it so I am not sure my fast reasoning is right (but it is a start). More at

http://en.wikipedia.org/wiki/Dot_product

Hope this helps,

Arno

On Oct 7, 2010, at 1:18 PM, Paul Kieffaber wrote:

> Hi all,
> Is there an easy way to compute interelectrode distances?
> I'm using the default 10-5 coordinates in EEGlab and am having trouble
> making sense of the units returned by standard computations of
> distance between polar coordinates.
> Any tips, or an M-file you wouldn't mind sharing?
>
> Many thanks,
> Paul
>
> --
> -----------------------------------------------------
> Paul Kieffaber, Ph.D.
> Assistant Professor
> Department of Psychology &
> Program in Neuroscience
> The College of William & Mary
> (757) 221-1965
> pdkieffaber at wm.edu
> -----------------------------------------------------
> _______________________________________________
> 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

```