The Trendy application is being retired in the new year. The new web application, ThingSpeak, offers similar functionality. We recommend that active Trendy users who are looking to create new trends use ThingSpeak. To begin collecting your data in ThingSpeak, please read the tutorial : ThingSpeak for Trendy users. Although Trendy no longer allows the creation of new trends, the application will still remain accessible until January 13, 2016. Until that date, you can view your current trends and download your data. After that date, your data will no longer be accessible. Thanks for using Trendy and we encourage you to check out ThingSpeak.


Plot of Temperatures in Anchorage (Curve Fit - Linear)

This is an example of how to do a linear fit. Note that it uses the three-argument output form of polyfit to avoid numerical problems with the time vector.

Plot Image
t = time1155;
d = data1155(:);

% Only use that last 30 day's worth of data
keep = t>(now-30);
t = t(keep);
d = d(keep);

[p,S,mu] = polyfit(t,d,1);

% p1 is the equation for the linear fit to the data
p1 = [p(1)/mu(2) p(2)-p(1)*mu(1)/mu(2)];
tf = [t(1) t(end)];
df = polyval(p1,tf);

hold on

Add Tags