You can use max(X,,dim) to specify the dimension from which to compute the maximum value. For example, if you let dim=2, then this computes the maximum value across each row of your matrix, resulting in a column vector; while dim=1 takes the maximum over each column of your matrix, resulting in a row vector. You could also try to re-arrange your data into a 41x41x6 array, where each "slice" in this 3-D cube is one of your original matrices. If you then entered max(X,,3), you would get a 41x41 matrix where each entry is the maximum value of that particular (i,j) location for each of the 6 41x41 matrices. You could then pare this down into a maximum value for all columns and all rows over all the 6 matrices. One way to do this is: max(max(X,,3),,2) to get the max across each row for all 6 arrays. To do this same thing for columns: max(max(X,,3),,1). Hope this helps!