Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please read: Divide each question into separate sections using the %% operator.

ID: 2267378 • Letter: P

Question

Please read: Divide each question into separate sections using the %% operator. Clearly write the answer to each question in a comment, using disp() or using fprintf). Given a table of final scores in Fall 2015 and Fall 2016 quarters from same group of students Student ID 1 Fall 201584 Fall 201678 4 78 95 75 42 100 83 76 94 87 32 84 71 a) Construct two 1D arrays named fall2015 and fall2016 to hold the scores from each quarter b) Find the minimum, maximum and average scores in Fall 2015 quarter c) Construct a logic array, named getA, to show in Fall 2016 quarter which students have scores >= 90 (ie. will get a grade A). (You must use rational operator(s) to get logic arrays). d) Construct a 1D array named grades getA of fall2016 to show the scores (90) and change the first element of grades_getA to 100 e) A new student has joined the fall 2016 class and got an A grade. Add the student's grade -96- to the fall2016 array using an array operator f) Find the IDs of students who got scores in the following ranges (in Fall 2015) i) Score >= average score in the fall ii) Score

Explanation / Answer

a)

fall2015 = zeros(9:1);
fall2016 = zeros(9:1);
for i=1:9
a=input('Enter the final scores of 2015 ');
fall2015(i)=a;
end
for i=1:9
b=input('Enter the final scores of 2016 ');
fall2016(i)=b;
end

fall2015
fall2016

b)

fall2015=[84 78 95 66 75 42 100 83 76]

fall2015
max(fall2015)
min(fall2015)
mean(fall2015)

c)

fall2016=[78 94 87 32 55 84 90 71 83]
getA=fall2016;
getA(fall2016>=90)=111
disp('Since we can not display letters in an numeric array, I have just displayed the number 111 who are getting above or equal to 90');

d)

fall2016=[78 94 87 32 55 84 90 71 83]
grades_getA=fall2016;
grades_getA(1)=100;
grades_getA
grades_getA(grades_getA>=90)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote