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 3-by-4 matrix. Beneath it is a 1-by-4 row vector with the maximum value of each column of the matrix independently. Beneath that is the single minimum value of the row vector.
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).
On the left, a 3-by-1 column vector; underneath is the scalar maximum value; under that is the minimum, which is the same value. On the right, a 1-by-4 row vector; underneath that is the same vector (representing the column maximums); under that is the minimum value.

Solution Stats

1758 Solutions

624 Solvers

Last Solution submitted on Mar 01, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...