Question: In MatLab: Write a function that takes as input an array of n numbers ( n > 2 0 ) . The function then finds

In MatLab:
Write a function that takes as input an array of n numbers (n>20). The function then finds the max value of the array then makes a new array of every multiple of 4 between 0 and the max value (not including 0). The function should return the max value and new array. Use built in functions where necessary. For example: if the vector is given as [4,6,10,16]. the function finds the max value (16 in this case). The new array output will be [4,8,12,16].
Then use this function to output the max value and the new vector from the intitial set of numbers generated as follows: 10*rand(1,50)

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 Programming Questions!