3D matrix manipulation. FInd values of given positions

1 view (last 30 days)
Hi there. Pls help me resolve an issue I cant find a solution for: I have a two 3D matrixes with the same dimentions( 288*288*80)off nii files. I want to search for nonzero positions on the first matrix and use thoses positions to go through the second matrix, and do a sum of the values located on those positions . How can I do it? Regards

Accepted Answer

lvn
lvn on 8 May 2014
This should do it:
sum(matrix2(matrix1~=0))

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!