convert column vectors to 2D array
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
If you had two column vectors (2 columns of data) in the workspace, how could you convert this to a 2D array?
Thanks for your help
0 Commenti
Risposte (2)
Azzi Abdelmalek
il 2 Ott 2012
Modificato: Azzi Abdelmalek
il 2 Ott 2012
a=[1;2;3]
b=[11;12;13]
v=[a'; b'] % vertical concatenation
w=[a b ] % horizontal concatenation
0 Commenti
Wayne King
il 2 Ott 2012
Also, you can use cat()
x = randn(100,1);
y = randn(100,1);
z = cat(2,x,y);
0 Commenti
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!