[t yr mo day rad] = textread('Ohare_Solar.txt','%d%d%d%d%f','headerlines',1);
m = 550;
%rad_smooth = conv(rad,ones(m,1)/m,'same');
rad_smooth = conv(rad,pdf('bino',0:m,m,0.5),'same');
figure(1);
plot(t,rad,'k.'); hold on;
plot(t,rad_smooth,'r-'); hold off;
xlabel('Day of Year');
ylabel('Daily Average Solar Radiation');
title('Figure 11: Solar Radiation Levels in 2005');

m = 30;
%rad_smooth = conv(rad,ones(m,1)/m,'same');
rad_smooth = conv(rad,pdf('bino',0:m,m,0.5),'same');
figure(2);
plot(t,rad,'k.'); hold on;
plot(t,rad_smooth,'r-'); hold off;
xlabel('Day of Year');
ylabel('Daily Average Solar Radiation');
title('Figure 11: Solar Radiation Levels in 2005');
