The attached text data file, MATRAX.dat, contains the following student exam data: Name E2 Apple, A....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The attached text data file, MATRAX.dat, contains the following student exam data: Name E2 Apple, A. Exxon, E. Facebook, F. Google, G. Ibm, I. Microsoft, M. Twitter, T. net ID a5123 e1567 f2321 93455 14678 m2134 t5321 Name Apple, A. Ibm, I. Google, G. Twitter, T. Facebook, F. Microsoft, M. Exxon, E. E1 85 20 A. Open this file using fopen, skip over the two header lines using fgetl, and use a single fscanf command to read the three numerical columns into a 7x3 matrix of grades, say G. Rewind but do not close the file. 68 85 86 55 70 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. netID a5123 14678 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. 93455 t5321 f2321 m2134 e1567 100 58 45 87 88 47 65 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: exam_AV E2 90 65 92 90 89 59 72 E1 E2 I AVE I I E2 85 100 86 88 85 87 90 70 65 72 68 45 92 55 47 59 20 58 65 67.00 70.00 79.57 90 89 I AVE | 91.67 | 87.67 | 87.33 | 69.00 | 68.33 | 53.67 | 47.67 | 72.19 Upload the new data file with your recitation report. Repeat this part using at most five fprintf commands (no for-loops). The attached text data file, MATRAX.dat, contains the following student exam data: Name E2 Apple, A. Exxon, E. Facebook, F. Google, G. Ibm, I. Microsoft, M. Twitter, T. net ID a5123 e1567 f2321 93455 14678 m2134 t5321 Name Apple, A. Ibm, I. Google, G. Twitter, T. Facebook, F. Microsoft, M. Exxon, E. E1 85 20 A. Open this file using fopen, skip over the two header lines using fgetl, and use a single fscanf command to read the three numerical columns into a 7x3 matrix of grades, say G. Rewind but do not close the file. 68 85 86 55 70 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. netID a5123 14678 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. 93455 t5321 f2321 m2134 e1567 100 58 45 87 88 47 65 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: exam_AV E2 90 65 92 90 89 59 72 E1 E2 I AVE I I E2 85 100 86 88 85 87 90 70 65 72 68 45 92 55 47 59 20 58 65 67.00 70.00 79.57 90 89 I AVE | 91.67 | 87.67 | 87.33 | 69.00 | 68.33 | 53.67 | 47.67 | 72.19 Upload the new data file with your recitation report. Repeat this part using at most five fprintf commands (no for-loops).
Expert Answer:
Answer rating: 100% (QA)
Heres the MATLAB code to solve the problem with explanations for each part A Reading Grades into Matrix Matlab fid fopenMATRAXdat r Open file for read... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these accounting questions
-
The Excel file Student Grades contains data on midterm and final exam grades in one section of a large statistics course. Construct a 95% confidence interval for the mean difference in grades between...
-
A professor has recorded exam grades For 20 students in his class, but one of the grades is no longer readable. If the mean score on the exam was 82 and the mean of the 19 readable scores is 84, what...
-
The following data show the exam grades for two different sections of a statistics class that I teach. The first group of data is from a day section of traditional students. The second group of data...
-
Holly funded the Holly Marx Trust in January 2020. The entire trust income is payable to her adult son Jack for 20 years. At the end of the twentieth year, the trust assets are to pass to Hollys...
-
What are the major components of a firm's buying center?
-
What is the difference between stocks and bonds? How does inflation impact the economy? What are the key factors that influence exchange rates? What is the role of central banks in a country's...
-
A company issues a \(10 \%\) coupon bond that matures in 5 years. However, this company is in trouble, and it is estimated that each year there is a probability of .1 that it will default that year....
-
Five years ago, Kennedy Trucking Company was considering the purchase of 60 new diesel trucks that were 15 percent more fuel-efficient than the ones the firm is now using. Mr. Hoffman, the president,...
-
Two soccer players kick a soccer ball back and forth along a straight line. The first player kicks the ball 15 m to the right to the second player. The second player kicks the ball to the left...
-
Which of the following is a positive reason for learning chemistry? (a) Chemistry is relevant to daily life (b) Chemistry offers career opportunities (c) Chemistry studies interesting topics (d)...
-
- Solve the linear recurrence xk+3 = 6xk+2 11xk+1 + 6xk, where xo = 2, x = 3, and x2 = 4. To solve this recurrence, you need to produce a vector xk Vk = xk+1 and matrices A, P, P-1, D such that k+1 =...
-
Required: 1-a. First, complete the table below to calculate the interest amount at December 31, Year 1. 1-b. Use the calculated value to prepare your journal entries for Year 1 transactions. 1-c....
-
Successful Organization empowers their employees to take risks when working under a constrained environment to ensure that their mission is accomplished highlight the importance of empowerment in an...
-
The cost function for a corporation (in millions of dollars) can be approximated by the function C(x)=0.123x-2.87x+26.32x-16.79 where x = 4 corresponds to the year 2004. (a) Find the following: C(0),...
-
The three lines on the graph are the same gas (both type and amount) for different temperatures. I will refer to them as either solid, (-100), dashed (20) and dotted (600). The Y-axis is the number...
-
What is the role of empowerment in Talent Management in the era of Talent Empowerment? What do you think are the best practices that companies can implement to empower their talented employees...
-
Given the MONTHLY price information provided about 3 stocks and the market (SPY), what is the annualized Reward to Systematic risk ratio for your favorite stock (Treynor's Ratio)? Risk-Free Rate =...
-
A firm offers two products for sale. The marginal cost of one product is new zero once the first unit has been produced. The marginal cost of the other product rises as output rises. What would be...
-
For each of the following cases, indicate the filing status for the taxpayer(s) for 2012 using the following legend: A - Single B - Married, filing a joint return C - Married, filing separate returns...
-
Scott Butterfield is self-employed as a CPA. He uses the cash method of accounting, and his Social Security number is 644-47-7833. His principal business code is 541211. Scott's CPA practice is...
-
Steve Drake sells a rental house on January 1, 2012, and receives $130,000 cash and a note for $55,000 at 10 percent interest. The purchaser also assumes the mortgage on the property of $45,000....
-
A football is thrown on a long pass. Compared to the balls initial horizontal velocity component, the velocity at the highest point is (a) greater, (b) less, (c) the same.
-
What process do you follow to make decisions for these different circumstances, and are you satisfied with the results?
-
A football is thrown on a long pass. Compared to the balls initial vertical velocity, the vertical component of its velocity at the highest point is (a) greater, (b) less, (c) the same.
Study smarter with the SolutionInn App