how i can sum the lines of a matrix?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponse acceptée
E K
le 29 Juil 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.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!