Question: Function Name: minMax Inputs: 1. (double) An array of doubles Outputs: 1. (double) Minimum value in the array 2. (double) Maximum value in the array

Function Name: minMax

Inputs:

1. (double) An array of doubles

Outputs:

1. (double) Minimum value in the array

2. (double) Maximum value in the array

Banned Functions: min(), max(), sort()

Function Background: You're a serious gamer; a board gamer! To prove how good you are at board games to yourself and to the world, you place all of your scores for many different games into an array, but quickly realize that your board gaming nemesis stole the min() and max() functions from MATLAB! Using your new iteration skills, you write them yourself in order to use them to prove that your maximum score is amazing (and even your minimum score isn't really so bad).

Function Description: Write a function that will find the maximum value and the minimum value of a given array.

Notes: You only need to iterate through the array once.

The array will have at least one element in it.

MATLAB please

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!