deltas#

swordfish.function.deltas()#

For each element Xi in X, return Xi-Xi-n, representing the differences between elements.

Parameters:
  • X (Constant) – A vector, matrix or table.

  • n (Constant, optional) – An integer specifying the step to shift when comparing elements in X. The default value is 1, meaning to compare the current element with the adjacent element at left.

Returns:

A vector/matrix/table with the same shape as X.

Return type:

Constant