NearestFunction

NearestFunction[data]
represents a function whose values give the elements closest to an element that is supplied.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Generate a NearestFunction:

In[1]:=
Click for copyable input
Out[1]=

Apply to a single element:

In[2]:=
Click for copyable input
Out[2]=

Apply to several elements:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2007
(6.0)