>> a=[ 2 1 2 1
2 1 2 4
1 1 4 4
4 1 2 2]
a =
2 1 2 1
2 1 2 4
1 1 4 4
4 1 2 2
>> sum(sum(a(1:3,:))) % 前3行总和
ans =
25
>>