Hi Guys!
I have a 3D logical array (142 x 177 x 156) denoted A. I wish to take the sum of all the logical 1 voxels in the first, followed by the second and third dimension respectively. The code written below do not work. Appreciate if someone could highlight to me how do I do this please?
x_true= sum(A(:),1);
y_true= sum(A(:),2);
z_true= sum(A(:),3);
nline= x_true + y_yrue + z_true
Best Answer