Question: Exercise # 1 a A professor will assign grades to their class as follows: any score more than 1 5 points above average will receive
Exercise # a
A professor will assign grades to their class as follows: any score more than points above average will receive an A from points inclusive above
average will receive a from points below average will receive a and more than points below average will receive a
Write a MATLAB function called grades.m which will take a single input, which is in an array of grades, and return outputs. The first output is the
number of As in the class, the second is the number of Bs the third is the number of Cs and the fourth is the number of Ds As a check, the MATLAB
commands :; A B C Dgrades should give Cs and DsHopefully the grade
distribution at the end of this course will be somewhat better!
Hints: Remember that the MATLAB mean command will calculate the average of an array of numbers. You will need a loop with a nested conditional to
do the counting. NOTE you need to combine a "for" loop and a conditional.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
