Filter löschen
Filter löschen

Adding Row Matrix to Another Row

1 Ansicht (letzte 30 Tage)
Carter ONeal
Carter ONeal am 13 Sep. 2017
Kommentiert: KSSV am 13 Sep. 2017
z = magic(5);
I need to add the elements of the third row to the elements in the fifth row while the third row remains unchanged.
z =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
  3 Kommentare
James Tursa
James Tursa am 13 Sep. 2017
Hints:
The i'th row of a matrix z is z(i,:)
The j'th column of a matrix z is z(:,j)
KSSV
KSSV am 13 Sep. 2017
@Carter.....you need to learn basics of MATLAB first rather then posting simple questions. MATLAB is a easy software with rich documentation..if you spend few minutes of time on documentation, you can achieve your task on your own. Later when you face complex situations in mere future, you can take use of this community. Read this link first:

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by