The matrix grades contains raw grades for 7 students who took your course. Each row represents a different student. The first 7 columns contain grades from 7 homework assignments, the next 3 columns contain grades from exams, and the last 5 columns contain grades from quizzes. If a student missed an assignment, their grade was recorded as 0.
The final grade for each student is calculated using the average of their raw scores weighted by how much each assignment type is worth. An example rubric would look something like:
r = [0.2 0.45 0.35]
which indicates that homework, exams, and quizzes are worth 20%, 45%, and 35% of each student's final grade, respectively.
Write a function that takes a rubric vector as an input and outputs the final grade for each student.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers438
Suggested Problems
-
Flip the vector from right to left
10657 Solvers
-
920 Solvers
-
578 Solvers
-
236 Solvers
-
351 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Since the problem states that "[i]f a student missed an assignment, their grade was recorded as 0", it would be cool if you could change the solution template to reflect that --- it currently records them as NaNs instead.
The inclusion of Nan is a part of the problem. You have to solve the problem keeping that in mind (like other users have done).