Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector.
Example: [1 2 5 7 5 7 4 3] Returns 7 and 4
[1 4;2 3] Returns 4 and 2
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers173
Suggested Problems
-
1750 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
560 Solvers
-
398 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
897 Solvers
-
Output any real number that is neither positive nor negative
411 Solvers
More from this Author306
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Second example is [1 4;2 3] Returns 4 and 3, not 2!!