Thank you so much for the help! I got it to work.
While most of the labels were correct, the matlab script returned the wrong location for one point . The script returned the label 'right cerebral white matter' for a point that seems to lie in the middle of the right amygdala. I have attached the screenshots. I do not think that there is a white matter area close enough to confuse the script. Could you tell me why this may have occurred?
When I write the line "crs = round(inv(aparcaseg.tkrvox2ras)*[tkr tka tks 1]')+1" , is there an error due to rounding in the conversion?
I was planning to inflate a sphere around each electrode point and get the neighboring anatomical regions as well.
Sparsh