Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

: The attached text data file, MATRAX.dat, contains the following student exam data: A. Open this file using fopen, skip over the two header lines

:

image text in transcribed

The attached text data file, MATRAX.dat, contains the following student exam data: A. Open this file using fopen, skip over the two header lines using fget 1 , and use a single fscanf command to read the three numerical columns into a 73 matrix of grades, say G. Rewind but do not close the file. B. Then, use a single textscan command to read from the file the two text columns N, I, of student names and netIDs, each being a 7x1 cell array of strings. You may now close the opened file. C. Using the function mean, compute the averages of the three exams for each student. The resulting column vector will be entered under the column labeled AVE in the above table. Enlarge the matrix G by appending to it the column AVE of averages. Then, compute the averages of each column, i.e., the average of each exam for the entire class, including the overall average for all exams and for all students. D. Using the function sortrows, sort the exam grades according the column AVE of averages, in descending order. Then, open a new data file, say, MATRAX2.dat, and using fprintf, write into it the sorted data including the original header lines and the computed averages. You may use a for-loop for printing the table data. The contents of this file should be as follows: Upload the new data file with your recitation report. Repeat this part using at most five fprintf commands (no for-loops)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

Students also viewed these Databases questions

Question

Discuss the key people management challenges that Dorian faced.

Answered: 1 week ago

Question

How fast should bidder managers move into the target?

Answered: 1 week ago