i have a few variables (arrays) that i need to dispaly in table form then write that table to spreadsheet file here's the part where declare the variables(im using app designer):
a1=a1*0.001;bx1=app.bx.Value;db1=app.db.Value;j=(bx1-b1)/db1 + 1; j=fix(j); i=1; bb=1:j; ph=1:j; ta=1:j; zl=1:j; zy=1:j;
this is the part of the code i used to print those variables into spreadsheet file after they enter a while loop which writes numbers to these variables:
TT=table(b1,ph,ta,zl,zy); my_directory='F:\project'; test_sheet=fullfile( my_directory, 'testsheet.xlsx'); writetable(TT, test_sheet, 'filetype','spreadsheet','sheet',1);
now the problem is that when the spreadsheet file comes out all the data in those variables are in the same row (also the first variable b1 only shows the last number in the array) as shown in the included attachment.
i've tried a lot of things but nothing seems to work either everything stays the same or it gets worse. any help is very appreciated.
Best Answer