你好!可以这样
i = 3; while(i<=size(s,2)) j = 2; while(j<=size(s,1)) total(j-1) = total(j-1) + s{j,i}; j = j+1; end i = i+1; end