difference $\Delta ^-,\Delta ^+$

Computes the nearest neighbour difference along a given direction. The optional argument ($\delta$) can be used to specify the number of neighbours to skip in computing the differences. The length of the dimension being differenced is reduced by $\delta$ in the result.

It comes in two different forms which differ only in how the resultant x-vector is calculated. $\Delta^-_i=x_i-x_{i-\delta}$, and $\Delta^+_i=x_{i+\delta}-x_i$, where $i$ refers to the x-vector index.