From: Ahmet Usta on 12 Jun 2010 12:34 Hello, I have an NxNxN matrix the elements of which is either zero or one. For example in the 2x2x2 case, N(1,1,1)=1 N(1,1,2)=0 N(1,2,1)=0 N(1,2,2)=0 N(2,1,1)=0 N(2,1,2)=0 N(2,2,1)=0 N(2,2,2)=1 I am trying to group the neighbouring elements which are '1'. For the matrix above N(1,1,1) and N(2,2,2) are nonzero and they are the neighbor of each other. So the output should be two distinct matrices, the first matrix should carry the indices (1,1,1) and the second matrix (2,2,2). Does anyone know of an algorithm which carries out this operation?
|
Pages: 1 Prev: Cartesian - cylindrical transformations Next: help to read data from Agilent DS06054a |