neighbors
(method of grain2d)
returns the number of neighboring grains
Syntax
[n,pairs] = neighbors(grains)
Input
grains |
@GrainSet |
Output
n |
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 4.0.4 |