I have a line vector like this: [1 5 6 -4 3] . I want to find the means of the absolute values โโof the second difference between the elements. The second difference in this example is: (6-1)=5 ,-4-5=-9 & 3-6=-3 , and the average absolute average is (5+9+3)/3=17/3 (6-1)=5 ,-4-5=-9 & 3-6=-3 .
Is there a way to use MATLAB's efficient matrix / massive manipulation to make it beautiful?
source share