Question: MATLAB program is required. Problem 4 (18 pts). Write a function to return the average of a sequence of numbers by removing one maximum and

 MATLAB program is required. Problem 4 (18 pts). Write a function

MATLAB program is required.

Problem 4 (18 pts). Write a function to return the average of a sequence of numbers by removing one maximum and one minimum value and the average without elements removed. If there are repeating maximum or minimum numbers, only remove one of them. The function should accept any number of elements in the sequence as input. The output should have two variables: averagel, the average with one minimum and one maximum value removed; and average 0 , the average without any elements removed. Test your function with sequence [1,2,6,9,5,9] (you should remove only one of the 9's and 1). You must write a Matlab function to complete the task

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!