The name of hope does not confuse. This is just an example. I have a row vector as follows: [1 5 6]. I want to find the average difference between each element. The differences in this example are 4 and 1, so the average is 2.5. This is a small example. My line vectors can be very large. I am new to MatLab, so is there an efficient way to use the efficient MATLAB matrix / array processing to make it beautiful?
There is already a similar question about SOF, but this question is specifically for MATLAB!
Thank:)
EDIT: As requested by @gnovice, I need an absolute difference.
source
share