mean(A,1):沿着第一维(列,竖着求)求平均值;
mean(A,2):沿着第二维(行,横着求)求平均值;
举例:
Z=[1 2 3;4 5 6];
>> mean(Z,1)
ans =
2.5000 3.5000 4.5000
>> mean(Z,2)
2 5