Clear Filters
Clear Filters

sum of each column of matrix

1 view (last 30 days)
Berbia
Berbia on 8 Jan 2013
I need to create a vector from a matrix by adding each column elements to form a corresponding vector component. matrix columns are fixed dimension 200. My result should be a row vector of dimension 200. How to do it simply in matlab??

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 8 Jan 2013
Edited: Azzi Abdelmalek on 8 Jan 2013
A=rand(300,200);
out=sum(A)

More Answers (0)

Categories

Find more on Multidimensional Arrays 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!