How to merge tow rows in one row?

1 vue (au cours des 30 derniers jours)
Mr.Hamza
Mr.Hamza le 13 Mar 2021
Commenté : Mr.Hamza le 13 Mar 2021
Hello every body
1 2 3 4
5 6 7 8
9 10 11 12
I have the above matrix and i want to merge the first and second row to be like that:
B = [ 1 2 3 4 5 6 7 8 ].

Réponses (1)

Alan Stevens
Alan Stevens le 13 Mar 2021
Like so
A = [ 1 2 3 4
5 6 7 8
9 10 11 12];
B = [A(1,:) A(2,:)];
  1 commentaire
Mr.Hamza
Mr.Hamza le 13 Mar 2021
it is perfect, thanks

Connectez-vous pour commenter.

Catégories

En savoir plus sur Multidimensional Arrays 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