Question: Write a MATLAB program that will: Load student data from the Excel file student _ data.xlsl . The student _ data file contains each student

Write a MATLAB program that will:
Load student data from the Excel file student_data.xlsl. The student_data file contains each students grades for four exams in a class as well as weight for each exam. Close the file. [num, txt, raw]=xlsread('student_data.xlsx')
Create an examWeight vector called examWeight, to hold the exam weights from the excel file. The numbers in the first row.
Create a Student structure array, called students, that will be populated with each students information (name, grades) available in the Excel file. A Student structure should have five fields extracted from the excel file. (name, exam1, exam2, exam3, final, finalGrade, letterGrade). After initialized the Student array, fill the structure array with data from the Excel file. the finalGrade and letterGrade to be filled in later.
Determine average for each of the four exams. Save your average grade in to a variable called avg_grade_of_exams in order, it is a 1x4 vector that holds the average for each exams.
Determine the final course grade for each student. The final course grade for each student is calculated by:
finalGrade=(e1*e1Weight+e2*e2Weight+e3*e3Weight+final*finalWeight)/100
Save your findalGrade in the corresponding structure field of the strudent structure of each student.
6. Determine how many students are above the class average, save it in a variable called num_above_average
7. Determine the letter grade for each student, save it in the letterGrade field of each student.
finalGrade >=90 A
finalGrade >=80 B
finalGrade >=70 C
finalGrade >=60 D
otherwise F
Do the following on your own MATLAB installation to check your understanding yourself. No need to turn in the following parts:
Add two columns into the student_data.xlsl file to the right of the Final column called Final Grade and Letter Grade. The Final Grade contains each students final course grade, and the Letter Grade contains each students letter grade for the class.
Create a new text file called student_grade.txt that contains each students name, final course grade, and letter grade for the course, one student at a line, separate fields with tab/spaces.
Element by element operation is allowed if that make it easier for a problem.
The program should work for student_data.xlsl file in this format with any length.At the end, the first five students have info like the following:
Student id: 1, Name: Ashlyn, Exam1: 89.00, Exam2: 76.50, Exam3: 78.00, Final: 55.00, Final Grade: 70.70, Letter Grade: C
Student id: 2, Name: Aston, Exam1: 90.00, Exam2: 73.00, Exam3: 95.00, Final: 100.00, Final Grade: 91.60, Letter Grade: A
Student id: 3, Name: Austin, Exam1: 97.00, Exam2: 97.00, Exam3: 72.00, Final: 76.00, Final Grade: 83.60, Letter Grade: B
Student id: 4, Name: Baer, Exam1: 74.00, Exam2: 55.00, Exam3: 87.00, Final: 90.00, Final Grade: 79.20, Letter Grade: C
Student id: 5, Name: Battle, Exam1: 93.00, Exam2: 94.00, Exam3: 95.00, Final: 100.00, Final Grade: 96.40, Letter Grade: A
Write a MATLAB program that will: Load student

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!