Ground level ozone is an air pollutant that can harm our health. Breathing ozone can cause a variety of health problems including chest pain, coughing, throat irritation, and airway inflammation. The...

The Ozone.txt file is the date needed for the code. The Matlab-Ozone file are the instructions and what needs to be written for this specific code.


Ground level ozone is an air pollutant that can harm our health. Breathing ozone can cause a variety of health problems including chest pain, coughing, throat irritation, and airway inflammation. The National Ambient Air Quality Standards (NAAQS) for ground-level ozone specify a maximum allowed measurement for ozone to be present in outdoor air. The 2015 primary NAAQS for ozone is 0.070 parts per million (ppm). The attached files (Ozone.txt and Ozone.xlsx) shows the average ground level ozone concentration (in ppm) from 1980 to 2018. The first column is the year and the second column is the ozone concentration (source: https://www.epa.gov/air-trends/ozone-trends). In this project, you are asked to analyze the data using MATLAB MATLAB Create a function file named ozoneAvg.m that calculate the average of the numbers in a given array (the function has one input and one output arguments) [1 point] 1. Create a script file and name it ozoneAnalysis.m (save it in the same folder with ozoneAvg.m function) [1 point] 2. Upload the Ozone.txt file to ozoneAnalysis.m and assign it to an array named ozoneData [1 point] 3. Use a for-end loop and if-end statements to find all the years with ozone concentration more than 0.075 ppm [hint: use ozoneData (k,1) and ozoneData (k,2) appropriately in the loop] a. Create a counter that count the number of years with ozone concentration above 0.075 ppm, name it above075 [1 point] b. Set up the for-end loop [1point] c. set up the if-end conditional statement [1point] d. Increase the above075 counter by one when the condition is met [1point] e. Use fprintf command to print each year with concentration above 0.075 and the average ozone concentration on that year. “The average concentration on xxxx was x.xxxx ppm” [1 point] f. Format the concentration so it is printed as x.xxxx for each year [1 point] g. Use fprintf command to print the number of years with concentration above 0.075 ppm. “The average ozone concentration was higher than 0,075 ppm for X years.” [1 point] 4. Use a for-end loop and If-else-end statements to go through ozoneData. [hint: use ozoneData (k,1) and ozoneData (k,2) appropriately in the loop] a. Create a counter to find the number of years that meet 2015 standard, name it meet2015. [1 point] b. Create a counter to find the number of years that does not meet 2015 standard, name it violate2015 [1 point] c. Set up the for-end loop [1point] d. set up the if-else-end conditional statement [1point] e. Increase the meet2015 counter by one when the condition is met [1point] f. Increase the violate2015 counter by one when the condition is NOT met [1point] g. Use fprintf command and print “Ozone concentration on xxxx was x.xxxx ppm and it meets the 2015 standard” if ozone concentration is less than or equal to 0.070 ppm [1 point] h. Use fprintf command and print “Ozone concentration on xxxx was x.xxxx ppm and it violates the 2015 standard” if ozone concentration is more than 0.070 ppm [1 point] i. Use fprintf command to print the number of years with concentration less than or equal to 0.070 ppm. “The average ozone concentration was in compliance with the 2015 standard for X years.” [1 point] j. Use fprintf command to print the number of years with concentration above 0.070 ppm. “The average ozone concentration violated the 2015 for X years.” [1 point] 5. Create a vector named ozoneConc that ONLY contains the concentration column of ozoneData matrix (hint – use :) [1 point] 6. Create a vector named ozoneYear that ONLY contains the year column of ozoneData matrix (hint – use :) [1 point] 7. Call the ozoneAvg function you created in step 1 to calculate the average of the items in ozoneConc [1 point] 8. Find the smallest and largest ozone concentration in ozoneConc vector [1 point] 9. Use fprintf to print the average ozone concentration “The average concentration of ozone between 1980 to 2018 is x.xxxx ppm”. [1 point] 10. Use fprintf to print the smallest and largest ozone concentration. The smallest concentration was x.xxxx ppm and the largest concentration was x.xxxx ppm”. [1 point] 11. Create a vector named “standard2015” with 39 elements all have a value of 0.07 (you can create it manually or using for-end loop) [1 point] 12. Plot the ozoneYear on the x-axis and the ozoneConc in the y-axis. Show standard2015 in the same graph you created in step13. Plot the ozoneYear on the x-axis and the standard2015 in the y-axis. [1 point] 13. Use dotted red line and * for the marks for the OzoneConc. Use dotted blue line and x for the marks of the standard2015. [1 point] 14. Make sure the graph contains title, x-label, y-label, and legend. Save the graph as pdf. Go to “Save As …” under “File” then change the “Save as Type:” to .pdf (don’t keep it .fig) and name it ozoneGraph.pdf (save it in the same folder for the homework because you need to submit it for grading) [1 point] 15. Publish the script file to pdf by typing the following in the Command Window: publish (‘ozoneAnalysis’, ‘pdf’), it will be saved in a folder named html inside the current folder (you need to submit ozoneAnalysis.pdf for grading) [1 point] 19800.101346939 19810.095637755 19820.094119898 19830.10180102 19840.094022959 19850.093147959 19860.091829082 19870.095703231 19880.105095238 19890.089765306 19900.089943878 19910.090558673 19920.084288265 19930.087181122 19940.087022959 19950.09119898 19960.086168367 19970.085489796 19980.09077551 19990.088392857 20000.082242347 20010.084163265 20020.08852551 20030.082836735 20040.07530102 20050.080405612 20060.079619898 20070.079719388 20080.07527551 20090.070081633 20100.073530612 20110.074658163 20120.076193878 20130.067415816 20140.068222789 20150.069218537 20160.069765306 20170.069028061 20180.070030612
Nov 29, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here