Example of Minimum and Maximum Value
For matrices, the functions min and max operate column wise by the default:
>> mat = randint(2,4,[1 20])
mat =
9 10 17 5
19 9 11 14
>> min(mat)
ans=
9 9 11 5
>> [minval, minind] = min(mat)
minval =
9 9 11 5
minind =
1 2 2 1