How to calculate the differences between the adjacent elements from two vectors?

43 views Asked by At

I want to calculate the differences between of the Nth value of the vector X and the N-1th value of the vector Y. All I know is the function delta, but it can only work within one vector. Does anyone know a better method? Thanks in advance.

1

There are 1 answers

0
Hanwei Tang On

deltas(X) is equivalent to X - prev(X). So you can do X - prev(Y) for your requirement.