I tried to find Max or Min to lists of lists, with Map with Apply ... but the only way has been Module ... maybe someone can show us a direct more efficient way
this is the source of data:
maxtest ={{7, 2, 5}, {7, 8, 1}, {20, 1, 19}, {8, 23, 15}, {26, 27, 1}, {13, 17,
4}, {3, 25, 22}, {28, 4, 24}, {25, 14, 11}, {24, 28, 4}, {25, 0,
25}, {11, 7, 4}, {28, 20, 8}, {6, 25, 19}, {34, 12, 22}, {25, 9,
16}, {6, 19, 13}, {10, 15, 5}, {7, 7, 0}, {23, 28, 5}}
and this is the weak solution I wrote
maxlist[lst_] := Module[{dim, i},
dim = Dimensions[lst[[2]]][[1]];
resp = Table[0, dim];
For[i = 1, i <= dim, i++,
resp[[i]] = Max[lst[[All, i]]]];
Return [resp]
]
giving me
In[17]:= maxlist[maxtest]
Out[17]= {34, 28, 25}
thanks for help!
{Min[#], Max[#]} & /@ maxtest
$\endgroup$Transpose[MinMax /@ Transpose@maxtest]
$\endgroup$mins = Min /@ maxtest; maxs = Max /@ maxtest
$\endgroup$