Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Name: NetID: Date: RUID: 1. What indices had the value of 1 in your output? 2. Write your answer here: 3. Write your answer here: 4. Write your answer here: 5. Write your answer here: Project 2 Report...

1 answer below »
Name:                            NetID:
Date:                            RUID:
1. What indices had the value of 1 in your output?
2. Write your answer here:
3. Write your answer here:
4. Write your answer here:
5. Write your answer here:

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 co
esponds 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 csvread 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 Number of
Vaccines
A 10
B 11
C 14
D 13
E 14
F 16
G 16
H 12
I 16
J 9
K 8
L 10
M 13
N 12
O 16
P 12
Q 11
R 12
S 14
T 8
U 15
V 9
W 12
X 10
Y 11
Z 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
y 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?
Answered 1 days After Apr 01, 2021

Solution

Kshitij answered on Apr 03 2021
143 Votes
solGrey/Code.m
%% Data Analysis
% clear screen and data
clc
clear all
close all
% load csv file
data=csvread('dataatod.csv');
% Extract data
phase=data(1,:);
dose=data(2,:);
N=data(3,:);
%% Number of vaccine in each phase
% for number of phase
for i=min(phase):1:max(phase)
% for N data
for j=1:numel(N)
% Extract number of vaccine for each phase
if phase(j)==i && dose(j)~=0
N_per_phase(i,j)=N(j);
end
end
end
% Visualize data
figure;
ar(sum(N_per_phase,2))
xlabel('Phase')
ylabel('Total Number of Vaccine')
title('Total Vaccine per Phase')
grid on
%% Number of vaccine given to people in each dose for each phase
% for number of phase
for i=min(phase):1:max(phase)
% for N data
for j=1:numel(N)
% extract number of dose in each phase
if dose(j)==1 && phase(j)==i
Total_dose_1(j)=N(j);
elseif dose(j)==2 && phase(j)==i
Total_dose_2(j)=N(j);
end
end
% visualize data for each phase
figure;
Dose_data=[sum(Total_dose_1) sum(Total_dose_2)];
bar(Dose_data)
xlabel('Dose')
ylabel('Total number of Vaccine')
title(['Vaccine Phase: ',num2str(i)])
grid...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here