Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The main objective of this exercise is to write a script to manipulate grades of a class of 15 students. The grades are indluded in

image text in transcribed
The main objective of this exercise is to write a script to manipulate grades of a class of 15 students. The grades are indluded in a data file named classGrades.mat. Follow the a)Create a new folder, name it "Assignment 3", and make it the current MATLAB b) Download the files, listed up in the Guidelines section, from the class OCS website following instruction and report all results in a published pdf document folder. Identify and display the current folder (use pwd) and save them in the "Assignment 3" folder. List the files in the current folder (use dir) c) Open the script m-file and name it HW3 Group m, where"xx" is your group number d) Load the classGrades mat file. (use load) This file contains a single variable called namesAndGrades. The first colum contains the 'names' of the students, they're just the integers from I to 15. The remaining 7 columns contain each student's score (on a scale from 0 to 5) on each of 7 assignments. There are also some NaNs which indicate that the student was absent on that day and didn't sunbmit the assignment You may see how namesAndGrades is structured by selecting this variable in the Workspace window nanmean function from the OCS in case it is not defined in your MATLAB version) Write the MATLAB Scripts for the following All answers and scripts should be enetered in the m-file, HW3 Group xxm )You believe that itis unfair to exclude the grades of absent students To account for his, replace the NaN grades with zeros, and calculate the averages again. Name this mean vector meanGrades 3 and display it. You may use isnan to check for NaN entries e) Display the first 5 rows on your screen. 0 Extract the submatris containing all the rows but only columns 2 through 8 and name this matrix grades (use size to make code work on any size matrix) k) Plot the three vectors meanGrades I, meanGraudes2, and meanGrades 3 in a bar g) The grades of the assignments are out-off S. Convert the 5-point grading scale to 100% scale. Use the same matrix name, grades Display the first 5 row of grade' Calculate the average score of each assignment. The result should be a Ix7 vector chart (use ban) The mean grades are plotted w.rt the assignments, ie. the x-axis is the assignement number. Include plot and aves titles, gridlines and legend Rodo part (Ak), where the mean grades are plotted w.rt the methods, ie the x-axis s the averaging method (meanGrades I, manGrades2, and meanGrales3) containing the average grade of each assignment h) First, do this using mean Name this mean vector meanGrades1 and displayit Notice that the NaNs that were in the grades matrix cause some of the average m) Save the varables "terGrdel, mean Grades1nd meaninateg in named HW3 Group mat, where miste group number dara file. grades to be NaN as well. do this again using nanmean This function does exactly what you want it to do, it computes the average using only the valid grades. This means that the absent students are not considered in calculating the averages Name this vector mnantinales2 and display it to verify that has no NaNs (Note download i) To fis this problem, Page 2 of 3 The main objective of this exercise is to write a script to manipulate grades of a class of 15 students. The grades are indluded in a data file named classGrades.mat. Follow the a)Create a new folder, name it "Assignment 3", and make it the current MATLAB b) Download the files, listed up in the Guidelines section, from the class OCS website following instruction and report all results in a published pdf document folder. Identify and display the current folder (use pwd) and save them in the "Assignment 3" folder. List the files in the current folder (use dir) c) Open the script m-file and name it HW3 Group m, where"xx" is your group number d) Load the classGrades mat file. (use load) This file contains a single variable called namesAndGrades. The first colum contains the 'names' of the students, they're just the integers from I to 15. The remaining 7 columns contain each student's score (on a scale from 0 to 5) on each of 7 assignments. There are also some NaNs which indicate that the student was absent on that day and didn't sunbmit the assignment You may see how namesAndGrades is structured by selecting this variable in the Workspace window nanmean function from the OCS in case it is not defined in your MATLAB version) Write the MATLAB Scripts for the following All answers and scripts should be enetered in the m-file, HW3 Group xxm )You believe that itis unfair to exclude the grades of absent students To account for his, replace the NaN grades with zeros, and calculate the averages again. Name this mean vector meanGrades 3 and display it. You may use isnan to check for NaN entries e) Display the first 5 rows on your screen. 0 Extract the submatris containing all the rows but only columns 2 through 8 and name this matrix grades (use size to make code work on any size matrix) k) Plot the three vectors meanGrades I, meanGraudes2, and meanGrades 3 in a bar g) The grades of the assignments are out-off S. Convert the 5-point grading scale to 100% scale. Use the same matrix name, grades Display the first 5 row of grade' Calculate the average score of each assignment. The result should be a Ix7 vector chart (use ban) The mean grades are plotted w.rt the assignments, ie. the x-axis is the assignement number. Include plot and aves titles, gridlines and legend Rodo part (Ak), where the mean grades are plotted w.rt the methods, ie the x-axis s the averaging method (meanGrades I, manGrades2, and meanGrales3) containing the average grade of each assignment h) First, do this using mean Name this mean vector meanGrades1 and displayit Notice that the NaNs that were in the grades matrix cause some of the average m) Save the varables "terGrdel, mean Grades1nd meaninateg in named HW3 Group mat, where miste group number dara file. grades to be NaN as well. do this again using nanmean This function does exactly what you want it to do, it computes the average using only the valid grades. This means that the absent students are not considered in calculating the averages Name this vector mnantinales2 and display it to verify that has no NaNs (Note download i) To fis this problem, Page 2 of 3

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_2

Step: 3

blur-text-image_3

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

Rules In Database Systems Third International Workshop Rids 97 Sk Vde Sweden June 26 28 1997 Proceedings Lncs 1312

Authors: Andreas Geppert ,Mikael Berndtsson

1997th Edition

3540635165, 978-3540635161

More Books

Students also viewed these Databases questions

Question

understand the meaning of the terms discipline and grievance

Answered: 1 week ago