Dear all,
I wonder if there is any easy solution available in Mata for calculating the difference between adjacent elements of a (column) vector? For example, the difference of vector Y should return (Y[2]-Y[1], Y[3]-Y[2], ..., Y[n]-Y[n-1]).
Thank you,
Eilya.
0 Response to Calculating differences between adjacent elements
Post a Comment