Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started