I have a row vector ‘a’ with a given coordinate (x, y, z) and I need to obtain the row in a coordinates array (B) with the coordinates are closest to the row vector ‘a’. I’ve been using a function that I found on the web:
matchrow(a,B) = findfirst(i->all(j->a[j] == B[i,j],1:size(B,2)),1:size(B,1))
but it doesn’t work for approximates (for a given tolerance). Is there a way of doing that?