<html><head><base href="x-msg://39/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Ross,<div><br></div><div>one way to attempt this, is to create a 3D grid on your fMRI data, so that each voxel is a grid point.</div><div>Then you can compute the distance between grid points from the fMRI grid and your virtual electrode grid and find the nearest neighbours.</div><div>This sould work for the whole brain as well as for predefined ROIs.</div><div><br></div><div>I've attached a function I use for similar problems. I'm sure there are more elegant ways but this works for me. It won't do exactly what you want to do, but maybe some bits and pieces can help you along.</div><div><br></div><div>Good luck,</div><div><br></div><div>Julian</div><div><br></div><div></div></body></html>