function [hfg]=hfg(T) 
  %evaporation enthalpy [kJ/kg] at T [celsius] 
 
 Tsat=[0:10:370,374.15];
  %saturation temperature in celsius

 hvap=[2501,2519,2538,2556,2574,2592,2609,2626,2643,2660,2676,2691,2706,2720,2734,2747,2758,2769,2778,2786,2793,2798,2802,2803,2803,2801,2796,2790,2780,2766,2749,2727,2700,2666,2623,2565,2481,2331,2095];
 %vapor saturation enthalpy in kJ/kg

 hliq=[0.000611,41.99,83.86,125.66,167.47,209.3,251.1,293.0,334.9,376.9,419.1,461.3,503.7,546.3,589.1,632.2,675.5,719.1,763.1,807.5,852.4,897.7,943.7,990.3,1037.6,1085.8,1135.0,1185.2,1236.8,1290,1345,1402,1462,1526,1596,1672,1762,1892,2095];
 %liquid saturation enthalpy in kJ/kg

deltah=hvap-hliq;

hfg=interp1(Tsat,deltah,T);
