cns_findnearest_at
n
closest to a specified point in common coordinate space along a particular dimension.
[v1 v2] = cns_findnearest_at(m, pz, dim, p, n) [v1 v2 ok] = cns_findnearest_at(m, pz, dim, p, n) [v1 v2 c1 c2] = cns_findnearest_at(m, pz, dim, p, n) [v1 v2 c1 c2 ok] = cns_findnearest_at(m, pz, dim, p, n) |
m
pz
dim
pz
.
p
n
v1, v2
pz
. These are guaranteed to be valid indices, i.e., between 1 and the dimension size. The range may be empty.
c1, c2
v1
and v2
except they are not guaranteed to be valid -- they can be less than 1 or greater than the dimension size. (This usually happens close to an edge.) Essentially, these are the indices that correspond to the search we performed, but they are not necessarily the indices of actual cells.
ok
v1
and v2
are returned, ok
is true iff (v1 == c1)
and (v2 == c2)
. When both ranges are returned, ok
is true iff the range (v1
- v2
) is not empty.
FIND_type_dim_NEAREST_AT
.