MATLAB: I want to vertically concatenate 8 matrices. They are all 3 columns, but they have different lengths. I don’t care about this, as I just want to make one very long matrix of three columns. padcat doesn’t seem to work. Thanks!

matrix

the matrices are called m0,m1,m2,m3,m4,m5,m6,m7. m0 is a matrix with three columns and 28500 rows, ie [28500×3]. m1 is [27948×3], m2[28444×3], m3 is [27894 x 3] … etc. I want to make one [longx3] matrix. Thanks so much!

Best Answer

result = vertcat(m0,m1,m2,m3,m4,m5,m6,m7)
or
result = [m0;m1;m2;m3;m4;m5;m6;m7]