mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
292 stars 186 forks source link

Subset assign of grain boundaries: Out of range exception #323

Closed filippeof closed 6 years ago

filippeof commented 6 years ago

Deleting gb returns an out of range error:

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)=[]

mtex 5.0.1

ralfHielscher commented 6 years ago

Thank you very much for reporting.

Ralf.