function [T,phi] = temp_bldg(t,k,w,T0 )
% TEMP_BLDG outputs the temperature and phase angle phi. The inputs are the
% time t, the constant k, the frequency w, and the initial temperature T0.
% The example was discussed in class on 6/10/09 and 6/12/09.
% 
phi = atan(w/k);
C = T0 - 25/k + 3*k/(k^2+w^2);
T = C*exp(-k*t) + 25/k - (3/sqrt(k^2+w^2))*cos(w*t - phi);

end

