% Template for question 1 of Problem Set 3 % Brian Hornbuckle, January 25, 2011. clear; load ivs_2009_air.dat; doy = ivs_2009_air(:,1); hhmm = ivs_2009_air(:,2); time = timeconvert(doy,hhmm,0); air = ivs_2009_air(:,3); % third column of data file is air temperature, deg C rh = ivs_2009_air(:,4); % fourth column is relative humidity, % figure(1) subplot(2,1,1) plot(time,air); grid on; xlabel('day of year'); ylabel('air temperature, \circC'); subplot(2,1,2) plot(time,rh); grid on; xlabel('day of year'); ylabel('relative humidity, %'); axis([195 196 70 100]); % zoom in on day 195 set(gca,'XTick',[195:3/24:196]); % set x ticks every 3 hours set(gca,'XTickLabel',{'midnight' '' '6am' '' 'noon' '' '6pm' '' 'midnight'}); % change the tick labels