%% Calculate the Acceleration of a Data Series for a Stock
% Load the file SimulatedStock.mat, which provides a timetable (TMW) for financial data for TMW stock.

load SimulatedStock.mat
TMW.Volume = []; % remove VOLUME field
acceleration = tsaccel(TMW);  
plot(acceleration.Time,acceleration.Variables)
legend('OPEN','HIGH','LOW','CLOSE')
title('Acceleration for TMW')

% Copyright 2012 The MathWorks, Inc.