>> A = magic(3)
A =
8 1 6
3 5 7
4 9 2
>> [M,I] = max(A)%%%%%%每一列的最大值以及序号
M =
8 9 7
I =
1 3 2
>> [M,I] = max(A())%%%%%%每一列的最大值以及序号
M =
8 9 7
I =
1 3 2
>> [M,I] = max(A(:))%%%%%%全部数据中的最大值以及序号
M =
9
I =
6
>> [M,I] = max(A(1:end))%%%%%%全部数据中的最大值以及序号
M =
9
I =
6
>> [M,I] = max(A(:,1))%%%%%%第一列数据中的最大值以及序号
M =
8
I =
1
>> [M,I] = max(A(:,1)')%%%%%%第一列数据转置后的最大值以及序号
M =
8
I =
1
>>