When you create a table, if you want the elements of the inputs to become rows of the table, then you need these inputs to be column vectors
So,
j = 5;
bb=1:j;
ph=1:j;
ta=1:j;
zl=1:j;
zy=1:j;
TT = table(bb,ph,ta,zl,zy);
creates a table with one row (all the inputs have only one row), where each variable is a 1x5 vector. Not very useful
j = 5;
bb = (1:j)';
ph = (1:j)';
ta = (1:j)';
zl = (1:j)';
zy = (1:j)';
TT = table(bb,ph,ta,zl,zy);
creates a table with 5 rows, each variable is a 5x1 by one vector. When written to excel, you'll get the result you want.
Best Answer