Problem 55245. Calculating Student Grades
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
Christian Schröder
on 4 Oct 2022
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.
Dyuman Joshi
on 4 Oct 2022
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).
Solution Comments
Show commentsProblem Recent Solvers310
Suggested Problems
-
357 Solvers
-
5213 Solvers
-
6413 Solvers
-
520 Solvers
-
1233 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!