finding the sum across the columns in a matrix

5 views (last 30 days)
Hi, I have a matrix 62599x60 double. I want the sum of the 60 columns in every row. The output should be a 62599x1 matrix.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 7 Dec 2014
Edited: Azzi Abdelmalek on 7 Dec 2014
a=[1 2;3 4]
s=sum(a,2)

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!