Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using MATLAB 5. You want to automate grading the multiple choice part of an exam, and the answers are in a file. Open the open
Using MATLAB
5. You want to automate grading the multiple choice part of an exam, and the answers are in a file. Open the open file test3_Answers.txt, using the file handle inFile. Populate an array called test3Answers which will contain the correct answers to the test questions. You may assume one answer on each line of the input file. Next, determine the number of questions student1 has gotten correct, and whether or not he/she passed the exam. A passing grade is any score 21 or greater (60%). student! = {A','B','D,,'D', D,,'C','c','A','B,,'B','C','A,, . . ., A','A, D'); index = 1; %index used to populate test3Answers test3Answers = { }; correct0; while feof(inFile) oneGrade fgetl(in File); %populate test3Answers arrayStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started