Question: USE MATLAB TO ANSWER: Write a script file called wet_bulb.m that calculates wetbulb temperature by using the MATLAB utility fzero to find the root of
USE MATLAB TO ANSWER:
Write a script file called wet_bulb.m that calculates wetbulb temperature by using the MATLAB utility fzero to find the root of the function ?q. Use Td and Ta as the endpoints of the interval containing the root T . Because fzero can only find the root of a function of one variable, you will have to use an anonymous function as input to fzero, as in the second example on the handout on Miscellaneous Useful Utilities.
Ask the user to input the air temperature Ta (in ?F), the dew point Td (in ?F), and the atmospheric pressure pa (in hectopascals).
Convert the units of Ta and Td to K.
Use fzero to find the root of ?q (T, Ta, Td, pa) for the given values of Ta, Td, and pa.
Display the calculated value of the wetbulb temperature in ?F.
Be sure to include comments describing the script file.
Test your code using Ta = 79.5 ?F, Td = 55.2 ?F, and pa = 1013.6 hPa. (UMass Lowell data from July 10, 2008, provided by Dr. Colby.) You should get a value of 64.1 ?F.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
