Closed MarcoWitte1 closed 8 years ago
Hi Marco,
the following should work
[grains,ebsd.grainId] = calcGrains(ebsd)
ebsd(grains(1))
Ralf.
Hallo Ralf,
but this causes another problem with the grain ID's when I want to merge the grains:
Index exceeds matrix dimensions.
Error in grain2d/merge (line 62)
grains_merged.poly(newInd) = grains.poly(keepInd);
Marco
Hi Marco,
I'm afraid this is way to short for me to understand what you want to do.
Ralf.
Hi,
sorry, that was really not very datailed. When I use
[grains,ebsd.grainId] = calcGrains(ebsd)
and then merge these grains like this:
gb= grains.boundary('1','1');
ind = angle(gb.misorientation,ori)<5*degree;
[grains_merge, grains_merge_id] = merge(grains,gb(ind));
I get the error
Index exceeds matrix dimensions.
Error in grain2d/merge (line 62)
grains_merged.poly(newInd) = grains.poly(keepInd);
I don't get any error when I just use
grains = calcGrains(ebsd)
to calculate the grains, but then the grain ID's are not correct.
Marco
Could you please share your data set and also post what is ori
. With out data sets I can not reproduce this bug.
Ralf.
Hi,
actually there is no bug! I just forgot to update the grain boundary indexing
gb= grains.boundary('1','1');
ind = angle(gb.misorientation,ori)<5*degree;
after calculating the grain ID's... Now everything works fine!
Thank you very much! Marco
Hi Ralf,
how can I extract the original ebsd data from a single grain or a grain set with MTEX 4.1.4? For example, grains(1) and ebsd(grains(1)) does not work properly, the resulting number of pixels are not the same. Also with the grainId I can not get the correct ebsd pixels.
All the best, Marco