Given a matrix A, find the maximum value of each column, then return the smallest of those maximum values (ie return the minimum of the column maximums).
A = [5 3 4 3;1 2 6 3;1 1 4 4];
m = minimax(A)
m =
3
Note that your function should work for matrices with one row or column (ie vectors) and scalars (in which case m = A).
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers624
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
52706 Solvers
-
Maximum running product for a string of numbers
2253 Solvers
-
2524 Solvers
-
11148 Solvers
-
2426 Solvers
More from this Author33
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Test suite 9 fails - min logic used
@Neha Shaah: how so? If the input is a row vector, the column maximums will be the elements themselves. Hence the minimum will be the minimum of the input vector itself.