x = [2 6 4 9 -10 3 1 5 -10]
then the output should be 9, because last minimum value (-10) lies at the 9th position.
The second test is wrong. 4 is not < 1.
The example seems to be wrong as well. The output should be 9 (as stated in test 1 which uses the same vector), not 7.
thanks Sean and Jon for comment on problem, I have corrected the same.
this is a test case specific solution and would not work if change the test cases.
How to find the position of an element in a vector without using the find function
Find Index of maximum Value and maximum Value of a vector
03 - Matrix Variables 6
Is this triangle right-angled?
Find the square of the sum of the digits of a number
Find nth maximum
Find the position of first minimum value in an integer array with numbers
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office