<div dir="ltr">Dear all,<br><br>    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.<br><div><br></div><div>% Index of maximum density example:<br></div>[d, m] = dipoledensity(randn(3,64)*50);<br>[~, idx] = max(d{1}(:));<br>[xidx, yidx, zidx] = ind2sub(size(d{1}), idx)<br><br><div>Many thanks,<br><br></div>    Laurens R Krol<br><br><br></div>