Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > List Manipulation > Math & Counting Operations on Lists > Differences >
Mathematica > Data Manipulation > Handling Arrays of Data > Math & Counting Operations on Lists > Differences >
Mathematica > Data Manipulation > Image Processing & Analysis > Basic Image Manipulation > Handling Arrays of Data > Math & Counting Operations on Lists > Differences >

Differences

Differences[list]
gives the successive differences of elements in list.
Differences
gives the n^(th) differences of list.
Differences
gives the successive ^(th) differences at level k in a nested list.
First differences:
Second differences:
First differences:
In[1]:=
Click for copyable input
Out[1]=
 
Second differences:
In[1]:=
Click for copyable input
Out[1]=
Differences of rows, within each column:
Differences of columns, within each row:
Deduce the degree of a sequence by seeing when successive differences become constant:
Finite difference approximation to the Laplacian of a Gaussian:
First differences are constant for a linear function:
Second differences are constant for a quadratic function:
Successive differences are progressively shorter:
FoldList acts as an inverse of Differences:
Successive differences mod 2 of a sequence based on the primes:
Pascal-triangle-like pattern:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF