MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
5th Edition
ISBN: 9781118629864
Author: Amos Gilat
Publisher: WILEY
Question
Book Icon
Chapter 4, Problem 1P
To determine

To write:

A MATLAB program in a script file that calculates heat index HI.

Expert Solution & Answer
Check Mark

Answer to Problem 1P

Solution:

The calculated value of heat index is 122.

Explanation of Solution

Given T=90°F

R=90%

The equation used by national weather service for the calculation of heat index HI

is given by,

HI=42.379+2.04901523T+10.14333127R6.83783×103T25.481717×102R2+1.22874×103T2R+8.5282×104TR21.99×106T2R2

Where,

T is the temperature in degrees F.

R is the relative humidity in integer percentage.

Substitute the given values of temperature and relative humidity in the above equation.

HI=42.379+2.04901523×90+10.14333127×0.96.83783×103×9025.481717×102×(0.9)2+1.22874×103×902×0.9+8.5282×104×90×(0.9)21.99×106×902×(0.9)2=122

Write the MATLAB program that calculates the heat index HI using the given values of temperature and relative humidity.

MATLAB Code:

%MATLAB Program that calculates the heat index by using the given values of temperature and relative humidity.

Temp = input('Enter the temperature in deg F: ');%Temperature

RH = input('enter the relative humidity in percentage: ');%Relative humidity

HI = -42.379+2.04901523*Temp+10.14333127*RH-0.22475541*RH*Temp-6.83783*10^-3*Temp^2-5.481717*10^-2*RH^2+1.22874*10^-3*Temp^2*RH+8.5282*10^-4*Temp*RH^2-1.99*10^-6*Temp^2*RH^2;

fprintf('\nThe Heat Index Temperature is: %.0f\n',HI)

Save the MATLAB Script with the name, Chapter4_29864_4_1P.m in the current folder.

Execute the script by typing the script name at the command window to get the code that gives the relative heat index by using the given values of temperature and relative humidity.

Result:

MATLAB: An Introduction with Applications, Chapter 4, Problem 1P

Conclusion:

Therefore, the calculated value of heat index is 122.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Business discuss
Business discuss
I just need to know why this is wrong below: What is the test statistic W? W=5 (incorrect) and  What is the p-value of this test? (p-value < 0.001-- incorrect)   Use the Wilcoxon signed rank test to test the hypothesis that the median number of pages in the statistics books in the library from which the sample was taken is 400. A sample of 12 statistics books have the following numbers of pages pages 127 217 486 132 397 297 396 327 292 256 358 272 What is the sum of the negative ranks (W-)? 75 What is the sum of the positive ranks (W+)? 5What type of test is this?     two tailedWhat is the test statistic W? 5 These are the critical values for a 1-tailed Wilcoxon Signed Rank test for n=12 Alpha Level 0.001 0.005 0.01 0.025 0.05 0.1 0.2 Critical Value 75 70 68 64 60 56 50 What is the p-value for this test?         p-value < 0.001
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc
Text book image
Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning
Text book image
Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning
Text book image
Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON
Text book image
The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman
Text book image
Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman