neighbors
(method of grain2d)
returns the number of neighboring grains
Syntax
[counts,pairs] = neighbors(grains)
Input
grains |
Output
counts |
number of neighbors per grain |
pairs |
index list of size N x 2, where pairs(i,:) give the indexes of two neighbored grains, i.e neighbor_gr = grains(pairs(1,:)) selects two neighbored grains. |
MTEX 5.2.beta1 |