Question: Write a MATLAB function named average_of_scores_with_drops The function will have two inputs and two return values. The first input will be a list of scores.
Write a MATLAB function named average_of_scores_with_drops The function will have two inputs and two return values. The first input will be a list of scores. The second input will be a postive integer representing the number of scores to drop. It will not be larger than the length of the list. Your function should determine the average of the scores after dropping the specified number of lowest scores. The first return value must be a real number equal to the average score. The second return value must be the number of items that were averaged. Notes: Example Test Case: SCORES = [20 40 60 80 100 20]; (avg,n] = average_of_scores_with_drops(SCORES, 2); results in avg=70, n=4 Sort the list DO NOT include the test cases. Save Reset Submit to MATLAB
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
