Finding multiple values in matrix
Ältere Kommentare anzeigen
Hi,
I have an fMRI scan file with activation values of voxels (voxels can be located by specific coordinates). Let's say v is the 72x72x33 matrix representing information from the scan file. I can easily find a single value for a given combination of coordinates. For instance, v(x1,y1,z1) would give me the value of the voxel at location (x1,y1,z1). However, the challenge is that I need to get the mean value of multiple voxels. Let's say A (3x250 matrix) represents all the voxel coordinates of interest (so there are 250 voxels total). Could you please tell me how to get the average value of all these 250 voxels from v?
Many thanks!
1 Kommentar
Image Analyst
am 15 Mär. 2013
I'd probably try using meshgrid to make a list of all possible voxel coordinates and then binarize that with the equation for a sphere. Then sum up the image inside the binary image.
Akzeptierte Antwort
Weitere Antworten (3)
Bart Boesman
am 12 Mär. 2013
Bearbeitet: Bart Boesman
am 12 Mär. 2013
0 Stimmen
Hi,
'Logical indexing' (<http://www.mathworks.nl/help/matlab/math/matrix-indexing.html#bq7egb6-1>) and 'sum() or mean()' should get you on the right track, I guess.
Bart
Thang Le
am 12 Mär. 2013
0 Stimmen
Thang Le
am 15 Mär. 2013
0 Stimmen
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!