From: Walter Roberson on
Israel Johnson wrote:
> I have a 1000-by-1500-by-100 matrix filled with zeros and clusters of
> 1's that represent metal particles within rubber (the rubber is
> represented with 0's). I need to find the volume and surface area of
> each particle. I have written code to find the volume and surface area
> of each particle, however, it can only run it on 1/2 of the full matrix
> (1000-by-750-by-100).

Is the implication that you run out of memory if you operate on the full
matrix? If so, have you considered using uint16 or int16 to store the
values? That would take 300 megabytes instead of 1.2 gigabytes, and
since that is 1/4 of what you have now, if it is a memory issue, you
should be able to fit the whole array even if you have to form a matrix
whose size is proportional to the square of the original matrix.