Matlab Differentiate, You can also calculate the derivative using the Matlab command diff.