How do i count the no of ones of 3D matrix?
Show older comments
- I have a big 3-D matrix, say 272*272*272, but contains either 0 or 1; how do i count the number of ones?
- In my project, i need to form a 8*8*8 cube (that why i choose the matrix is 272*272*272). How can i cut this big matrix into 8*8*8 and assign a index for every cube(8*8*8)?
2 Comments
Image Analyst
on 22 Nov 2013
Why do you need an index? What's wrong with the x,y,z value of the center? What are you going to do? Would you like to use blockproc()?
ting
on 22 Nov 2013
Accepted Answer
More Answers (0)
Categories
Find more on Resizing and Reshaping Matrices 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!