Question: MATLAB 1. Write a function called GPA that calculates a student's overall and in-major grade point averages Function specification Input argument: a struct with the

MATLAB

MATLAB 1. Write a function called GPA that calculates a student's overall

1. Write a function called GPA that calculates a student's overall and in-major grade point averages Function specification Input argument: a struct with the following fields: Name, a string, for example: "Albert Einstein Grades, a column vector of letter grades, for example: NOTE: To simplify matters, we are not allowing + or -grades. This enables converting from letters to quality points with a one-line logical expression. See the GPA function in Exercise 10 for some guidance. Credits, a column vector containing the number of credits of each course, for example: 4; 3; 3:4; 5; 2:4; 4; 5; 2; 2; 3; 3 4:4 Major, a logical array, indicating whether each course is a major course, for example: [true: true: false: true: false: false: true: true: false: true false; false; true; true; false] (or [1; 1; 0;1;..]) NOTE: Grades, Credits, and Major must have the same lengtlh Output argument: a 1x2 row vector containing the overall GPA and the in-major GPA Overall GPA Total Grades Tetat crades Major GPA = Total Gradesor Major Courses Total Credits for Major Courses overall GPA 1. Write a function called GPA that calculates a student's overall and in-major grade point averages Function specification Input argument: a struct with the following fields: Name, a string, for example: "Albert Einstein Grades, a column vector of letter grades, for example: NOTE: To simplify matters, we are not allowing + or -grades. This enables converting from letters to quality points with a one-line logical expression. See the GPA function in Exercise 10 for some guidance. Credits, a column vector containing the number of credits of each course, for example: 4; 3; 3:4; 5; 2:4; 4; 5; 2; 2; 3; 3 4:4 Major, a logical array, indicating whether each course is a major course, for example: [true: true: false: true: false: false: true: true: false: true false; false; true; true; false] (or [1; 1; 0;1;..]) NOTE: Grades, Credits, and Major must have the same lengtlh Output argument: a 1x2 row vector containing the overall GPA and the in-major GPA Overall GPA Total Grades Tetat crades Major GPA = Total Gradesor Major Courses Total Credits for Major Courses overall GPA

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 Databases Questions!