What do you want to do?
I'm trying to select an individual grain using grains.id.
What data do you have?
I'm working on orientation data acquired using EBSD on a tungsten sample.
What code do you use?
Please provide minimalist code with code in the following form
%load orientation data
ebsd = EBSD.load([pathname '\' filename],CS,'interface','ctf','convertEuler2SpatialReferenceFrame');
%calculate grains
[grains,ebsd.grainId,~] = calcGrains(ebsd('indexed'),'angle',2*degree);
% neglect grains with an area less than three pixels
grains(grains.grainSize<=2) = [];
for t = 1:numel(grains.id)
% define, which grain shall be evaluated
g = grains(grains.id==grains.id(t));
% ... some evaluation %
end
What result do you get
None, the script stops at specific grains and the error message shown below is printed. It should however be noted that the majority of grains are evaluated without any issue.
What result do you expect
The code should select the grain with the respective grainId and make it analysable.
Error Message
Unable to perform assignment because the indices on the left side are not
compatible with the size of the right side.
Error in grain2d/subSet (line 68)
inverseorder(ind2) = ind1;
Error in grain2d/subsref (line 65)
grains = subSet(grains,ind);
What MTEX version do you use?
I use MTEX version 5.8.1
What do you want to do? I'm trying to select an individual grain using grains.id.
What data do you have? I'm working on orientation data acquired using EBSD on a tungsten sample.
What code do you use? Please provide minimalist code with code in the following form
What result do you get None, the script stops at specific grains and the error message shown below is printed. It should however be noted that the majority of grains are evaluated without any issue.
What result do you expect The code should select the grain with the respective grainId and make it analysable.
Error Message
What MTEX version do you use? I use MTEX version 5.8.1