Join columns from multiple tables to make 1 really long column

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)

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.
See the Access Data in Tables page for more on how to work with tables.
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)];

Tags

Asked:

on 3 Feb 2022

Answered:

on 3 Feb 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!