Effacer les filtres
Effacer les filtres

how can i add 2 row

6 vues (au cours des 30 derniers jours)
Light
Light le 6 Juin 2013
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?

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Juin 2013
A(FirstRow,:) + A(SecondRow,:)
Or if you want to get fancier,
sum(A([FirstRow, SecondRow],:))
  1 commentaire
Light
Light le 7 Juin 2013
Tnx

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Modeling 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!

Translated by