How do I turn two columns into one row?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sean Hiddleston
le 21 Oct 2019
Commenté : Sean Hiddleston
le 21 Oct 2019
My data looks like this:
a 1
b 2
c 3
d 4
etc.
I want it to look like this:
a 1 b 2 c 3 d 4
How do I get it into this format?
4 commentaires
Réponse acceptée
David Hill
le 21 Oct 2019
If a cell array,
a={'a' 1;'b' 2;'c' 3;'d' 4};
b=a';
c=b(:)';%should give up the cell array in the format you desire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Whos 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!