Filter löschen
Filter löschen

how i can sum the lines of a matrix?

4 Ansichten (letzte 30 Tage)
george
george am 29 Jul. 2012
p.x
1 4 5 2 1 ...
3 1 9 3 2 ...
=
4 5 14 5 3
but with out knowing the number of lines or the number of rows
thanks

Akzeptierte Antwort

E K
E K am 29 Jul. 2012
if a is a x-by-y matrix
b=sum(a) will give you a new b matrix which will be 1-by-y matrix which will have the summation of each column.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by