deltas#

swordfish.function.deltas()#

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

参数:
  • 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.

返回:

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

返回类型:

Constant