I have a 2 dimensional cell of tables, B, in Matlab, i.e.:
A = table(normrnd(0,1,5,1),normrnd(0,1,5,1),normrnd(0,1,5,1));
B = {A,A,A,A;A,A,A,A}
B =
[5x3 table] [5x3 table] [5x3 table] [5x3 table]
[5x3 table] [5x3 table] [5x3 table] [5x3 table]
I would like to concatenate the tables in the 1st dimension of the cell array (the 2 rows), but keep the cell structure in the other dimension. Thus, I would like to have the following:
{cat(1,B{:,1}),cat(1,B{:,2}),cat(1,B{:,3}),cat(1,B{:,3})}
ans =
[10x3 table] [10x3 table] [10x3 table] [10x3 table]
However, since my actual cell array has much more than 2 rows and 4 columns, this is not a suitable solution. I have tried using cat and vertcat, but I can't get them to not concatenate in the second dimension. Using ´cat´, I get:
cat(1,B{:})
ans =
[40x3 table]
Any ideas?
Thanks!