Question: In Matlab Create function gpa_cal( grades, hours) to compute gpa and total hours Inputs Grades is array of letter grades e.g, grades =[ABBC] Hours is
In Matlab
- Create function gpa_cal( grades, hours) to compute gpa and total hours
- Inputs
- Grades is array of letter grades e.g, grades =[ABBC]
- Hours is array of course hours g., hours =[4 3 3 3]
- For each grade, convert to grade points (A=4, , F=0)
- gpa = sum(pts.* hours)/sum(hours)
- Test cases
- Grades =[ACCB], hours=[3 4 3 3]
- Grades = [BACB], hours=[4 1 3 3]
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
