hi i have a question for example I have these two matrices a and b and I want to join them in one, how could I do that?
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jose Sandoval
le 13 Juil 2017
Réponse apportée : Jose Sandoval
le 13 Juil 2017
a=[1;3;5;7;9]; b=[2;4;6;8;10];
Resulting matrix
c=[1;2;3;4;5;6;7;8;9;10];
0 commentaires
Réponse acceptée
Jos (10584)
le 13 Juil 2017
a=[1;3;5;7;9]; b=[2;4;6;8;10];
c = [a b] % concatenate. only works because a and b have the same number of rows
c = c.' % transpose
c = c(:) % reshape
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!