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 #1 a
A professor will assign grades to their class as follows: any score more than 15 points above average will receive an A , from 0-15 points (inclusive) above
average will receive a B, from 0-15 points below average will receive a C, and more than 15 points below average will receive a D.
Write a MATLAB function called grades.m which will take a single input, which is in an array of grades, and return 4 outputs. The first output is the
number of A's in the class, the second is the number of B's, the third is the number of C's, and the fourth is the number of D's. As a check, the MATLAB
commands t=1:140; [A, B, C, D]=grades (75+25*cos(t).*sin(3*t) should give 20A's,57B's,38 C's, and 25 D's.(Hopefully 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.
Exercise # 1 a A professor will assign grades to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!