. Is there anyway to show this and the other rules in Matlab either numerically or symbolically?

I tried to create an array, u:

`u = [1,3,6,8,24];uprime = diff(u)`

which output a vector of differences (not sure if this is what I wanted).

Then I tried to take an average of uprime using the following code below:

`mean(uprime) `

According to the rule, I should have gotten 0, but I got an average of the numbers in the vector which was nonzero. Am I misinterpreting the rule or is the diff function not actually taking a derivative?

## Best Answer