who to replace a row in matrix ?

1 Ansicht (letzte 30 Tage)
Firas Al-Kharabsheh
Firas Al-Kharabsheh am 3 Apr. 2016
Beantwortet: li yan am 3 Apr. 2016
how to replace a row of matrix with the vector extract from another matrix for example
A = [ 1 0 1 1 0 1
1 0 1 0 1 1
1 1 1 0 1 0 ]
B = [ 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 ]
and i want a function to move row from A to B but in the same position of row for example
  • i want to move the first row in A and the function must Put it in First row in B
  1 Kommentar
John D'Errico
John D'Errico am 3 Apr. 2016
Please stop asking the same question repeatedly.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

li yan
li yan am 3 Apr. 2016
you just need to do like this
B(1,:) = A(1,:);

Kategorien

Mehr zu Resizing and Reshaping Matrices 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