Included from trend description:
What is the change in activity happening on Cody?
% time1300 and data1300 available for use
% for How is Cody Trending?
%
% Cody recent activity count
% time vector is: time1300
% data vector is: data1300
lookback = 30;
df = diff(data1300(end-lookback:end));
tm = time1300(end-(lookback-1):end);
plot(tm, df, 'bs-');
set(gca,'XTick',tm(1:2:end));
datetick('keepticks');
grid on
data points
Created 28 Jan 2012 by Jim
128 views (30 days)
This trend is associated in this plot (though may not be used.)
1 comment
You might want to normalize by the time between samples. If your time sampling is irregular (you miss a day or two, for example), your diff will be thrown off.