[Eeglablist] dipoledensity: Maximum density coordinates

Laurens R Krol lrkrol at gmail.com
Wed Aug 23 04:08:41 PDT 2017


Dear all,

    I am looking at dipole densities as returned by dipoledensity.m. In
particular, I am interested in the coordinate of the maximum density. I can
get the index of the maximum value in the returned density array, as e.g.
below, but how can I translate this index into a coordinate in mm? I assume
the "transform" field from the returned MRI structure is the key, but I do
not know how to turn it.

% Index of maximum density example:
[d, m] = dipoledensity(randn(3,64)*50);
[~, idx] = max(d{1}(:));
[xidx, yidx, zidx] = ind2sub(size(d{1}), idx)

Many thanks,

    Laurens R Krol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170823/fe21d255/attachment.html>


More information about the eeglablist mailing list