pos2ind edit page

convert x,y,z coordinates into indices of ebsd

Syntax

ind = pos2ind(ebsd,x,y)
ebsd(ind)
[i,j] = pos2ind(ebsd,x,y,z)
ebsd(i,j)
ind = pos2ind(ebsd,pos)

Input

ebsd EBSDsquare
x,y,z spatial coordinates
pos vector3d

Output

ind index to EBSDsquare
i,j indices to EBSDsquare