MATLAB: Finding the sum across the columns in a matrix

finding sum

Hi, I have a matrix 62599×60 double. I want the sum of the 60 columns in every row. The output should be a 62599×1 matrix.

Best Answer

a=[1 2;3 4]
s=sum(a,2)