how can i add 2 row
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
A=[-1,-1,0,0,0;0,0,0,-1,0;0,1,-1,0,-1;0,0,1,0,0;1,0,0,1,1]
With that matrix how can i add row to row command (code)
And in any kind of matrix?
0 commentaires
Réponse acceptée
Walter Roberson
le 6 Juin 2013
A(FirstRow,:) + A(SecondRow,:)
Or if you want to get fancier,
sum(A([FirstRow, SecondRow],:))
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!