Join columns from multiple tables to make 1 really long column
Show older comments
Hi, Very New to MatLab.
I am trying to Join T1(:,3) to the bottom of T2(:,3) ext. So the column data continues i just 1 varible. I have spent much time searching for the answer and cannot work it out. It is probably quite easy but please save me from pulling my hair out.
Thank you
Answers (2)
Cris LaPierre
on 3 Feb 2022
Edited: Cris LaPierre
on 3 Feb 2022
If you want to join the data to a new variable, try something like this to create a vector.
data3 = [T1{:,3};T2{:,3}]
Use parentheses instead of curly braces if you want the result to be a table.
David Hill
on 3 Feb 2022
Do you have a table or matrix? If a table, for a new column matrix as such:
m=[T1.Var3;T2.Var3];%not sure what your variables in your table are named
If T1 and T2 are just matrices which it appears based on T1(:,3) format:
m=[T1(:,3);T2(:,3)];
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!