Question: USE MATLAB USE MATLAB! QUESTION 1a: Write a function that will receive a vector as an input argument, and will output all the values from
USE MATLAB


USE MATLAB!
QUESTION 1a: Write a function that will receive a vector as an input argument, and will output all the values from lowest to highest in the vector, until the mean of the numbers is reached (including the mean). For example, if the input vector has the values [5 8 2 4 6], the mean is 5 so the function would return [2 4 5). Write the function without using any loops and if-statements. QUESTION 1b: This time, write a function that will receive a matrix instead as an input argument, and will output all the values from highest to lowest in the matrix, until the mean of the numbers is reached (including the mean). For example, if the matrix is: [3 11 matrix = 2 0 9 9 5 4 The function will return: [9 9 7 5] QUESTION 4: Pretty much same as QUESTION 1a, write a function that will output all the values that are equal to or below the mean of the numbers, however the numbers do not need to be sorted. This time write the function without using any built-in functions such as mean, sum and sort in MATLAB. However, built-in function length", loops and conditional statements can be used if necessary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
