Here's the code I used:
function [mmr, mmm] = minimax(M)
B = M';
maxie = max(B);
minnie = min(B);
mmr = abs(maxie - minnie)
mmm = abs(max(maxie) - min(minnie));
The max and min functions read columns, not rows. So the M' switches columns to rows, so that issue is resolved. Abs() is used to ensure absolute value and no negative numbers.