Heat Index code based off NWS's Heat Index Calculator tool: NWS (National Weather Service). Meteorological Conversions and Calculations: Heat Index Calculator. 2014. Available: https://www.wpc.ncep.noaa.gov/html/heatindex.shtml
Heat index values are not valid for extreme temperature and relative humidity conditions beyond the range of data considered by Steadman (see References). Works with arrays of any dimension and NaN values. If your "no data" values are not set to NaN, convert beforehand or the code won't work.
1. National Weather Service (NWS) Technical Attachment (SR 90-23). 1990. Available: https://www.weather.gov/media/ffc/ta_htindx.PDF
2. Steadman, R.G., 1979: The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. J. Appl. Meteor., 18, 861-873.
3. Anderson GB, Bell ML, Peng RD. Methods to calculate the heat index as an exposure metric in environmental health research. Environ Health Perspect. 2013;121(10):1111–1119. doi:10.1289/ehp.1206273
Eric Shearer (2020). NWS Heat Index (https://www.mathworks.com/matlabcentral/fileexchange/72710-nws-heat-index), MATLAB Central File Exchange. Retrieved .
Previous HI equation out of date. Updated with 2014 version.
Fixed link to the calculator.