%% Calculate the Moving Average for a Data Series
% Load the file SimulatedStock.mat, which provides a timetable (TMW) for financial data.

load SimulatedStock.mat
type = 'linear';
windowSize = 14;
ma = movavg(TMW_CLOSE,type,windowSize)

% Copyright 2012 The MathWorks, Inc.