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

USE MATLAB!! 5. A list of exam scores (S) (in percent out of 100%) is given: 72,

ID: 2087930 • Letter: U

Question

USE MATLAB!!

5. A list of exam scores (S) (in percent out of 100%) is given: 72, 81, 44, 68, 90, 53, 80, 75, 74, 65, 55, 92, 85, 69,41,73,70, 86, 56, 65, 79, 94, 69. Write a computer program that calculates the average (Av) and standard deviation (Sd) of the scores, which are rounded to the nearest integer. You may not use mean ) or std ), but you can use other MATLAB built-in functions, including loops. The mathematical formula for the standard deviation can be found here: https://www.mathworks.com/help/matlab/refstd.html. (Use the formula under the "More About" section on that webpage.) Then, the program must determine the letter grade of each of the scores according to the following scheme: Score Range (%) Letter Grade Av-0.5 *Sd S

Explanation / Answer

MATLAB CODE

clc;
clear all;
close all;
Score = [72 81 44 68 90 53 80 75 74 65 50 92 85 69 41 73 70 86 61 65 79 94 69];
%denote Avergae
Av = round(sum(Score)/length(Score));
%denote standard deviation
Sd = round(std(Score));

P=['Average : ',num2str(Av),' Standard deviation : ',num2str(Sd)];
%display average and standard deviation
disp(P)
for j = 1:length(Score)
%denotes grade A
if Score(j) >= Av + 1.3*Sd
grade = 'A';
%Denotes Grade B
elseif Score(j) < Av + 1.3*Sd && Score(j) >= Av + 0.5*Sd
grade = 'B';
%Denotes Grade C
elseif Score(j) < Av + 0.5*Sd && Score(j) >= Av - 0.5*Sd
grade = 'C';
%Denotes Grade D
elseif Score(j) < Av - 0.5*Sd && Score(j) >= Av - 1.3*Sd
grade = 'D';
else
grade = 'F';
end
P = ['List Value : ',num2str(Score(j)),' GRADE : ',num2str(grade)];
disp(P)
end

OUTPUT