Problem_set_2 Sustainability Science 5060 Problem Set #2 – due October 16, 2020 Write Matlab code to solve the following problems. Submit your code and your answers. 1. Assume that the average January...

See problem set PDF attached


Problem_set_2 Sustainability Science 5060 Problem Set #2 – due October 16, 2020 Write Matlab code to solve the following problems. Submit your code and your answers. 1. Assume that the average January temperature in NYC Central Park has a Gaussian distribution with mean µ = 33.3°F and standard deviation σ = 4.48°F. (a) How much more likely is it to observe this mean temperature (µ) than the temperature that was observed in January 2020 (39.1°F)? (b) The coldest January ever recorded occurred in 1918, when the average temperature was 21.7°F. What is the probability of observing a temperature this cold or colder? You should solve this problem using the equations for the Gaussian distribution presented in the lectures. You should not use the built-in Matlab functions normpdf and normcdf in your submitted code, although you can use these functions to verify your answers if you wish. Hint: for (b), use the built-in Matlab function erf to evaluate the error function. Also note that inf is a built-in Matlab constant referring to infinity. 2. A vector T stores the observed January temperature in Central Park for the last ten years (2011-2020), with T=[29.7 37.3 35.1 28.6 NaN 34.5 38.0 NaN 32.5 39.1]. We’ve assumed here that the data are missing for the years 2015 and 2018 (they’re not really), and have assigned a value of NaN (not a number) for these years. Write code that will do the following: (a) Identify missing values (NaNs) in the vector T, and store the associated indices in a new variable. Do this using the built-in Matlab functions find and isnan. (b) Print to the screen the indices associated with the missing values in T. (c) Using these indices, assign a temperature value to the missing years (i.e., modify the vector T), where this value is simply the arithmetic average of the temperature in the year before and the year after.
Oct 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here