Would be more useful if Trendy updated at 2pm rather than midnight.
Included from trend description: Toronto gas price from tomorrowsgaspricetoday.com
% Toronto Gas price
% time vector is: time1520
time1520 = time1520 + 0.25;%since is predicting next day
TD = datestr(time1520','d');
% data vector is: data1520
time1 = time1520(end-6:end);
time1disp = datestr(time1','d')
data1 = data1520(end-6:end);
Su = mean(data1520(1:7:end));
M = mean(data1520(2:7:end));
Tu = mean(data1520(3:7:end));
W = mean(data1520(4:7:end));
Th = mean(data1520(5:7:end));
F = mean(data1520(6:7:end));
Sa = mean(data1520(7:7:end));
data2 = [Su M Tu W Th F Sa];
time2 = time1520(1:7);
find(TD(end-6:end)==TD(3))+4
data2 = circshift(data2',find(TD(end-6:end)==TD(3))+4);
time2 = circshift(time2',find(TD(end-6:end)==TD(3))+4);
time2disp = datestr(time2,'d')
hold on
plot(time1,data1, 'o-');
plot(time1,data2, 'rx');
datetick
grid on
ylabel('Price')
datetick('x','d')
legend('This week','Week Day ave','Location','NorthWest')
price = num2str(data1(end));
text(time1(end), data1(end)+0.25, ...
{price});
today2 = datestr(time1(end))
text(time1(end)-1, data1(end)-0.25, ...
{today2});
hold off
%%
if 0
format long
TD = datestr(time1520','d');
DAT = data1520'
test=find(TD(end-6:end)==TD(1))
format short
end
data points
Created 14 Mar 2012 by Albert Yam (1 Like)
199 views (30 days)
This trend is associated in this plot (though may not be used.)
2 comments
Well, not really useful unless there is a way to get Trendy to update it at 2-3pm instead of 12:15 am. But I tried.
Fixed, error due to website change.