function Cp = CpAir(T)

% Heat capacity of air in J/(mol K), where T is in K. The
% equation is valid only in the range 273 K < T < 1800 K
%
% Called as Cp = CpAir(T)

if T < 273
   disp('Temperature too low')
   Cp = -1; % Return obviously incorrect value
elseif T > 1800
   disp('Temperature too high')
   Cp = -1; % Return obviously incorrect value
else
   Cp = 28.09 + 0.1965e-2*T + 0.4799e-5*T^2 - 1.965e-9*T^3;
   end
