Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Numerical Data > Exploratory Data Analysis > NearestFunction >
Mathematica > Data Manipulation > Statistical Data Analysis > Exploratory Data Analysis > NearestFunction >
Mathematica > Mathematics and Algorithms > Statistical Data Analysis > Exploratory Data Analysis > NearestFunction >

NearestFunction

NearestFunction[data]
represents a function whose values give the elements closest to an element that is supplied.
  • NearestFunction[...][x] gives the element closest to a particular element x.
Generate a NearestFunction:
Apply to a single element:
Apply to several elements:
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]=
Give the 3 nearest elements:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF