[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',10*degree);
Which calculates 2605 grains for me. I then remove some small grains:
grains = grains(grains.grainSize > 4)
And now I have 1535 grains, which I would like to use for misorientation analysis:
ind = ebsd.mis2mean.angle > 20*degree;
grainIds = ebsd(ind).grainId;
grainIds = unique(grainIds);
Now the grainIds go up to 2605, so the following command will not work, because there are only 1535 grains:
distortedgrains = grains(grainIds)
Is there a way to update the property ebsd.grainIds after removing grains?
Thank you