1980 0.101346939 1981 0.095637755 1982 0.094119898 1983 0.10180102 1984 0.094022959 1985 0.093147959 1986 0.091829082 19
Posted: Thu May 05, 2022 1:21 pm
1980 0.101346939 1981 0.095637755 1982 0.094119898 1983 0.10180102 1984 0.094022959 1985 0.093147959 1986 0.091829082 1987 0.095703231 1988 0.105095238 1989 0.089765306 1990 0.089943878 1991 0.090558673 1992 0.084288265 1993 0.087181122 1994 0.087022959 1995 0.09119898 1996 0.086168367 1997 0.085489796 1998 0.09077551 1999 0.088392857 2000 0.082242347 2001 0.084163265 2002 0.08852551 2003 0.082836735 2004 0.07530102 2005 0.080405612 2006 0.079619898 2007 0.079719388 2008 0.07527551 2009 0.070081633 2010 0.073530612 2011 0.074658163 2012 0.076193878 2013 0.067415816 2014 0.068222789 2015 0.069218537 2016 0.069765306 2017 0.069028061 2018 0.070030612
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 xxxxxx 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] Create a vector named ozoneCone that ONLY contains the concentration column of ozoneData matrix (hint-use
[1 point] 6. 7. Create a vector named ozone Year that ONLY contains the year column of ozoneData matrix (hint-use
[1 point] 8. Call the ozoneAvg function you created in step 1 to calculate the average of the items in ozoneConc [1 point] 9. Find the smallest and largest ozone concentration in ozoneConc vector [1 point] 10. Use fprintf to print the average ozone concentration "The average concentration of ozone between 1980 to 2018 is x.xxxx ppm". [1 point] 11. 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] 12. 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] 13. Plot the ozone Year on the x-axis and the ozoneCone in the y-axis. Show standard2015 in the same graph you created in step13. Plot the ozone Year on the x-axis and the standard2015 in the y-axis. [1 point] 14. 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] 15. 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] 16. Publish the script file to pdf by typing the following in the Command Window: publish ('ozone Analysis", "pdf"), it will be saved in a folder named html inside the current folder (you need to submit ozoneAnalysis.pdf for grading) [1 point]
ENGR 1811 Individual Project 1 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 and MS Excel. MATLAB (30 points) 1. 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] 2. Create a script file and name it ozone Analysis.m (save it in the same folder with ozoneAvg.m function) [1 point] 3. Upload the Ozone.txt file to ozoneAnalysis.m and assign it to an array named ozoneData [1 point] 4. 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] 5. 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 [1 point] 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 xxxxxx 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] Create a vector named ozoneCone that ONLY contains the concentration column of ozoneData matrix (hint-use
ENGR 1811 Individual Project 1 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 and MS Excel. MATLAB (30 points) 1. 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] 2. Create a script file and name it ozone Analysis.m (save it in the same folder with ozoneAvg.m function) [1 point] 3. Upload the Ozone.txt file to ozoneAnalysis.m and assign it to an array named ozoneData [1 point] 4. 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] 5. 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 [1 point] e. Increase the meet2015 counter by one when the condition is met [1point]