subsref edit page

implements grains(1:3)

Syntax

grains(1:10)            % the 10 first grains
grains('Fe')            % only Fe grains
grains('id',5)          % give the grain with id 5
grains(5)               % give the 5th grain in the list
grains( ~grains('fe') ) % all grains but Fe
grains(cond)

Input

grains grain2d
cond logical array with same size as grains