Function Name: putItTogetherInput: (double) A 1×16 vector…
Function Name: putItTogetherInput: (double) A 1×16 vector of numbersOutput: (double) A 1×4 vector that is constructed from the input vector according to the instructions belowDescription: Write a function called puItTogether that divides the input vector into four 1×4 vectors. Your function then constructs the output vector in the following way.. The first value in the output vector should be the maximum value in the first fourth. The second value of the output vector should be the average of the values in the second fourth rounded to two decimal places. The third value of the output vector should be the second value of the third fourth when it is sorted in descending order. The fourth value in the output vector should be the number of values in the last fourth that are greater than 8. Return the output vector Examples: >> vec = ;>> a = putItTogether(vec)a = 1×4 4.0000 6.5000 11.0000 4.0000>> vec = >> a = putItTogether(vec)a = 1×4 14 9 11 2>> vec = >> a = putItTogether(vec)a = 1×4 13 10 15 1