function output = houravg(data, step); % % function output = houravg(data, step); % % Compute an hourly average (unless otherwise indicated % by step) of current meter data collected every 225 sec. % This is NOT a running mean, such as performed by filter. % % data = time series vector % step = length of the 'window' % output = averaged output % [row, col] = size(data); idx = 1:step:row; output = mean(data(idx:idx+step,:));