Question: Write a MATLAB program in a script file that calculates the average, standard deviation, and median of a list of grades and also keeps track
Write a MATLAB program in a script file that calculates the average, standard deviation, and median of a list of grades and also keeps track of the total number of grades entered. The program asks the user to enter the grades as elements in a vector (enclosed in []). If any of the grades are negative, it asks the user to enter the grade vector again. The program then calculates the required quantities using MATLAB's built-in functions. Then, the program will ask the user if they want to enter another grade vector for another class. If "yes" or "y" is entered (not case-sensitive), the user can input another vector and give them the quantities for that vector. Execute the program and enter the following grades: 81, 65, 61, 78, 94, 80, 65, 76, 77, 95, 82, 49, and 75. The results are displayed in the Command Window in the following format: count = 13 avg-grade = 75.2308 std-dev = 12.7681 med grade = 77 Another example is: 65, 89, 90, 77, 95, 56, 96, 93, 92, 86. Solution: 10, 83.9, 13.6174, and 89.5 for the 4 above quantities respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
