M-File Help: diff2 | View code for diff2 |
First-order difference
d = diff2(v) is the first-order difference (1xN) of the series data in vector v (1xN) and the first element is zero.
d = diff2(a) is the first-order difference (MxN) of the series data in each row of the matrix a (MxN) and the first element in each row is zero.
© 1990-2014 Peter Corke.