Question: Write a MATLAB program that reads a data file (Lab4.dat), where each line contains a student's ID, the student's grades on Exam 1, Exam 2,

 Write a MATLAB program that reads a data file (Lab4.dat), where

Write a MATLAB program that reads a data file (Lab4.dat), where each line contains a student's ID, the student's grades on Exam 1, Exam 2, the Final Exam and the Lab, the student's current quality points earned, and the student's current semester hours earned. For each student, the program will do the following: 1) Calculate the semester grade as follows: Exam 1 counts 20% of the semester grade. Exam 2 counts 25% of the semester grade. The Final Exam counts 45% of the semester grade. The Lab counts 15% of the semester grade. 2) Calculate the quality points for this course as: Quality Points - 3*ceil((semester grade - 59)/10) 3) Calculate the total quality points as the quality points already earned plus the quality points for this course. 3) Calculate the total semester hours as the semester hours already earned plus the semester hours for this course which is 3. 5) Calculate the GPA as total quality points divided by total semester hours. 6) Print the ID, the grades on Exam 1, Exam 2, the Final Exam and the Lab, the semester grade, and the GPA. The program will also calculate and print the average Exam 1 grade, Exam 2 grade, Final Exam grade, Lab grade, semester grade, and GPA. The output of this program should look like this: ID=4681 E1-67 E2=73 Final=78 Lab=81 Grade=78.90 GPA-2.125 ID=5932 E1-94 E2=89 Final=97 Lab=85 Grade=97.45 GPA-3.375 ID=7456 E1=65 E271 Final=55 Lab=68 Grade=65.70 GPA-1.372 ID=2814 El=81 E2=87 Final=75 Lab=94 Grade=85.80 GPA-2.425 ID=3267 E1-76 E2-82 Final=64 Lab=79 Grade=76.35 GPA-2.314 ID=9548 E1-79 E2=88 Final=92 Lab=86 Grade=92.10 GPA 3.500 ID=6375 El=98 E2-86 Final=94 Lab=89 Grade=96.75 GPA-3.793 ID=8193 E1-86 E2-75 Final=93 Lab=88 Grade=91.00 GPA 3.300 Average El = 80.75 Average E2 = 81.38 Average Final = 81.00 Average Lab - 83.75 Average Grade = 85.51 Average GPA - 2.776 Write a MATLAB program that reads a data file (Lab4.dat), where each line contains a student's ID, the student's grades on Exam 1, Exam 2, the Final Exam and the Lab, the student's current quality points earned, and the student's current semester hours earned. For each student, the program will do the following: 1) Calculate the semester grade as follows: Exam 1 counts 20% of the semester grade. Exam 2 counts 25% of the semester grade. The Final Exam counts 45% of the semester grade. The Lab counts 15% of the semester grade. 2) Calculate the quality points for this course as: Quality Points - 3*ceil((semester grade - 59)/10) 3) Calculate the total quality points as the quality points already earned plus the quality points for this course. 3) Calculate the total semester hours as the semester hours already earned plus the semester hours for this course which is 3. 5) Calculate the GPA as total quality points divided by total semester hours. 6) Print the ID, the grades on Exam 1, Exam 2, the Final Exam and the Lab, the semester grade, and the GPA. The program will also calculate and print the average Exam 1 grade, Exam 2 grade, Final Exam grade, Lab grade, semester grade, and GPA. The output of this program should look like this: ID=4681 E1-67 E2=73 Final=78 Lab=81 Grade=78.90 GPA-2.125 ID=5932 E1-94 E2=89 Final=97 Lab=85 Grade=97.45 GPA-3.375 ID=7456 E1=65 E271 Final=55 Lab=68 Grade=65.70 GPA-1.372 ID=2814 El=81 E2=87 Final=75 Lab=94 Grade=85.80 GPA-2.425 ID=3267 E1-76 E2-82 Final=64 Lab=79 Grade=76.35 GPA-2.314 ID=9548 E1-79 E2=88 Final=92 Lab=86 Grade=92.10 GPA 3.500 ID=6375 El=98 E2-86 Final=94 Lab=89 Grade=96.75 GPA-3.793 ID=8193 E1-86 E2-75 Final=93 Lab=88 Grade=91.00 GPA 3.300 Average El = 80.75 Average E2 = 81.38 Average Final = 81.00 Average Lab - 83.75 Average Grade = 85.51 Average GPA - 2.776

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!