Question: help me debug this code please Part 4 - lowest.m Create a function with the header [X,i]=lowest(A) that will find the lowest value of the
Part 4 - lowest.m Create a function with the header [X,i]=lowest(A) that will find the lowest value of the array A and output the value in X and the index (location) of that value in i. This function should work for an array A of any length Don't get this confused with Part 3 - in Part 3 you were allowed to use the min function, now for Part 4 you are writing your own minimum function that will find both the location of the lowest value and the index of the lowest value. I suggest doing this by first assuming the first number in the array is the lowest and then comparing it with each subsequent number to see if it is greater than or less than that number. Rules - you cannot use the MATLAB sort() function and you cannot use the max () or min( ) functions (or any variations of these functions) Check your function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
