intersect

(method of grainBoundary)

length of a boundary segment

Syntax

[x,y] = intersect(gB,xy1,xy2)
[x,y,segLength] = intersect(gB,xy1,xy2)

Input

gb

grainBoundary 1, xy2 coordinates of the endpoints of the line

Output

x,y

list of intersection points

mple exdata csl ains = calcGrains(ebsd) ot(grains.boundary) efine some line 1 = [0,10]; staring point 2 = [31,41]; end point ne([xy1(1);xy2(1)],[xy1(2);xy2(2)],'linewidth',1.5,'color','g') ,y] = grains.boundary.intersect(xy1,xy2); ld on atter(x,y,'red') ld off ind the number of intersection points m(~isnan(x))