%% Multiple Differences
% Create a vector and compute the second-order difference between the elements.

X = [0 5 15 30 50 75 105];
Y = diff(X,2)

% Copyright 2012 The MathWorks, Inc.