How can we join two matrices of two dimmention
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Abdulkareem
le 12 Mar 2014
Réponse apportée : Sagar Damle
le 12 Mar 2014
hey everybody i have two matrices of 476*11 i want to join them in one matrix of 952*11 . thanks in advance
0 commentaires
Réponse acceptée
Mischa Kim
le 12 Mar 2014
Modifié(e) : Mischa Kim
le 12 Mar 2014
Abdulkareem, simply use
C = [A; B];
where A and B are your 476-by-11 matrices.
A = [1 2 3; 4 5 6];
B = [9 8 7; 6 5 4];
C = [A; B]
C =
1 2 3
4 5 6
9 8 7
6 5 4
0 commentaires
Plus de réponses (3)
Sagar Damle
le 12 Mar 2014
For two matrices A and B; 1. for horizontal concatenation,use [A,B] or horzcat(A,B). 2. for vertical concatenation,use [A;B]. Also see help about function 'cat()'.
0 commentaires
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!