euclidean distances (fMRI)

Hello,
I am working with functional MRI. I have some groups of foci from different experiments. I would greatly appreciate if someone can give any hint on how to measure the euclidean distances between a seed voxel and a the individual foci the a databased experiments (groups of foci/coordinates).
Thank you very much
Lorena

3 Comments

http://en.wikipedia.org/wiki/Euclidean_distance
Perhaps you could provide us with a little more information about your data.
Lorena
Lorena on 17 Oct 2011
I would greatly appreciate if someone can give any hint on how to measure the euclidean distances between a seed voxel and the individual foci of all databased experiments (groups of foci/coordinates).
Lorena
Lorena on 17 Oct 2011
Hello,
Thanks for replying. I have some individual seed voxels and a set of experiments, I want to measure the euclidean distances between each of those seeds and the groups of foci reported from those experiments to know which coordinates reported closest activation to my seed voxel.
Thank you very much for helping me on this matter
Lorena

Sign in to comment.

 Accepted Answer

%sample 2d data
seed = [11 30];
others = round(rand(10,2)*50);
%Engine
dists = sqrt(sum(bsxfun(@minus,seed,others).^2,2));
Add a third column for the third dimension.

1 Comment

Lorena
Lorena on 17 Oct 2011
Hello Sean,
I will give it a try
Thank you so much :-)
Lorena

Sign in to comment.

More Answers (0)

Categories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!