mtexdata forsterite
grains=calcGrains(ebsd('forsterite'))
gb=grains.boundary;
gb(1);% shows correct boundary
gb(1)=[]; % ... error: Dimension argument must be a positive integer scalar within indexing range.
gb.prop.gbId=1:length(gb) % assign a new prop: gb id
gb(gb.prop.gbId==1)=[]; % works ok
% logical indexing also works:
boolId=[false(10, 1); true(length(gb)-10, 1)]
gb(boolId)=[]
Deleting gb returns an out of range error:
mtex 5.0.1