Please complete in MATLAB. ONLY THE REPORT NEEDS TO BE FINISHED. Do NOT write any code. Only questions 1-4 in the first two photos need to be complete. Other photos are for context. Thank you. Will give a thumbs up.
Project 2 Report Instructions 1. See the .csv files available for download on Canvas labeled with letters of the alphabet, as in "dataMtoP.csv". Download the file that corresponds with the initial of your last name as it is listed on Canvas. For instance, if your last name is Brown, you would download dataAtoD. If your last name is Rupavatharam, you would download dataQtOT. Use cspread to load this data into MATLAB. It should load a matrix with 3 rows. Call your program with the data from this csv file as your data input, and the number of vaccines listed on the table below: Last Name Initial Ol A B C D E F G H 1 L M N o P Q R S T U V w Y Z Number of Vaccines 10 11 14 13 14 16 16 12 16 9 8 10 13 12 16 12 11 12 14 8 15 9 12 10 11 13 What are the index numbers of individuals who received the vaccine? 2. This project required you to work with matrix data. In 6 sentences or less, please describe how you used counting variables and indexing to navigate through data in this project. 3. This project required you to implement programming methods that would prioritize individuals by vaccine phase and dose number. In 6 sentences or less, please describe the specific programming methods (an example of a programming method is a while loop) to implement priorities. 4. You were tasked with generating your own test data for this project. What was one of the matrices you generated to test your program? Write the lines of code that would use that matrix to test your program. What output would you expect from those tests? Project 2 - Vaccine Distribution Introduction This project will require you to write a function that handles matrix data using loops and indexing You work for a government entity and have been tasked with processing information about vaccine supply needs. Vaccines are being distributed to people in 5 phases, based on their age, pre-existing conditions, and jobs that place them at risk. Vaccines must be distributed in 2 doses. You have information about the following: - Anonymous information from people in the vaccine site's region: The phase that they are eligible for o Whether they have had 0, 1, or 2 doses of the vaccine How many days it has been since the last dose of the vaccine for an individual. The number of vaccine doses that will be available each day. You have been tasked with determining a distribution plan for determining which individuals will get the vaccine on a given day Procedure Write a function that takes 2 inputs: A 3xN matrix of data on people in the region. Each column represents a different person. o Row 1 is eligibility o Row 2 is how many doses they have received Row 3 is how many days it has been since their last dose. Those who haven't had any vaccine doses will have a -1 in this row. The number of vaccines available on a day The function should return one output: A 1xN array containing either 1 or 0. o I represents an individual who is to receive a vaccine dose o represents an individual who will not receive a vaccine dose Column indices in your input matrix and output array represent the same individuals. The number of l's in your output array should always be equal to the number of vaccines available that day Your function should prioritize lower phase numbers for receiving a vaccine. You function should only give vaccines to individuals who have received fewer than 2 doses. Your function should not give vaccines to individuals who have received a vaccine dose within the last 21 days. Your function should prioritize first doses over second doses for people in the same phase. If two people are at the same phase, have the same number of doses, and are able to receive a vaccine today, but there is only 1 dose left for that day, give the vaccine to the person with the lower column index. Testing Your Code: Examples Here is an example matrix of data: 1 5 3 2 1 30 22 23 25 2 2 1 4 0 -1 4 1 30 2 1 18 2 1 25 3 0 -1 5 0 -1 For this example, if there were 2 doses of the vaccine available, the output would be: 0 0 0 0 0 0 1 0 1 0 If there were 4 doses of the vaccine available, the output would be: 0 1 0 1 0 10 0 1 0 In another example, if your matrix of data was: 4 0 -1 3 0 - 1 2 0 - 1 1 1 18 5 0 - 1 3 0 - 1 2 1 10 1 0 -1 And there were 5 doses available, the output would be: 0 0 1 0 Please generate at least 2 pieces of test data yourself. They can be small (1.e. the sizes of these examples) and determine what the correct output would be in order to further test your function When generating test cases, try to test as many rules as possible with each test case. Project 2 Report Instructions 1. See the .csv files available for download on Canvas labeled with letters of the alphabet, as in "dataMtoP.csv". Download the file that corresponds with the initial of your last name as it is listed on Canvas. For instance, if your last name is Brown, you would download dataAtoD. If your last name is Rupavatharam, you would download dataQtOT. Use cspread to load this data into MATLAB. It should load a matrix with 3 rows. Call your program with the data from this csv file as your data input, and the number of vaccines listed on the table below: Last Name Initial Ol A B C D E F G H 1 L M N o P Q R S T U V w Y Z Number of Vaccines 10 11 14 13 14 16 16 12 16 9 8 10 13 12 16 12 11 12 14 8 15 9 12 10 11 13 What are the index numbers of individuals who received the vaccine? 2. This project required you to work with matrix data. In 6 sentences or less, please describe how you used counting variables and indexing to navigate through data in this project. 3. This project required you to implement programming methods that would prioritize individuals by vaccine phase and dose number. In 6 sentences or less, please describe the specific programming methods (an example of a programming method is a while loop) to implement priorities. 4. You were tasked with generating your own test data for this project. What was one of the matrices you generated to test your program? Write the lines of code that would use that matrix to test your program. What output would you expect from those tests? Project 2 - Vaccine Distribution Introduction This project will require you to write a function that handles matrix data using loops and indexing You work for a government entity and have been tasked with processing information about vaccine supply needs. Vaccines are being distributed to people in 5 phases, based on their age, pre-existing conditions, and jobs that place them at risk. Vaccines must be distributed in 2 doses. You have information about the following: - Anonymous information from people in the vaccine site's region: The phase that they are eligible for o Whether they have had 0, 1, or 2 doses of the vaccine How many days it has been since the last dose of the vaccine for an individual. The number of vaccine doses that will be available each day. You have been tasked with determining a distribution plan for determining which individuals will get the vaccine on a given day Procedure Write a function that takes 2 inputs: A 3xN matrix of data on people in the region. Each column represents a different person. o Row 1 is eligibility o Row 2 is how many doses they have received Row 3 is how many days it has been since their last dose. Those who haven't had any vaccine doses will have a -1 in this row. The number of vaccines available on a day The function should return one output: A 1xN array containing either 1 or 0. o I represents an individual who is to receive a vaccine dose o represents an individual who will not receive a vaccine dose Column indices in your input matrix and output array represent the same individuals. The number of l's in your output array should always be equal to the number of vaccines available that day Your function should prioritize lower phase numbers for receiving a vaccine. You function should only give vaccines to individuals who have received fewer than 2 doses. Your function should not give vaccines to individuals who have received a vaccine dose within the last 21 days. Your function should prioritize first doses over second doses for people in the same phase. If two people are at the same phase, have the same number of doses, and are able to receive a vaccine today, but there is only 1 dose left for that day, give the vaccine to the person with the lower column index. Testing Your Code: Examples Here is an example matrix of data: 1 5 3 2 1 30 22 23 25 2 2 1 4 0 -1 4 1 30 2 1 18 2 1 25 3 0 -1 5 0 -1 For this example, if there were 2 doses of the vaccine available, the output would be: 0 0 0 0 0 0 1 0 1 0 If there were 4 doses of the vaccine available, the output would be: 0 1 0 1 0 10 0 1 0 In another example, if your matrix of data was: 4 0 -1 3 0 - 1 2 0 - 1 1 1 18 5 0 - 1 3 0 - 1 2 1 10 1 0 -1 And there were 5 doses available, the output would be: 0 0 1 0 Please generate at least 2 pieces of test data yourself. They can be small (1.e. the sizes of these examples) and determine what the correct output would be in order to further test your function When generating test cases, try to test as many rules as possible with each test case