hello, below you can find an example on how to store data in a table in a loop
DataC = ["A","B","C","D","E","F","G","H","I","J"];
varTypes = ["double","double","string"];
varNames = ["DataA","DataB","DataC"];
MyTable = table('Size',[numLoop numCol],'VariableTypes',varTypes,'VariableNames',varNames);
MyTable(n,:) = {DataA(n), DataB(n), DataC(n)};
------------------------------------------------------------------------------------------------------------------------------------------------------
Edit: next to the orginal example, i also added modified the code with the later added example data and script, see attachment
@Yew Jen Chong: the code is to slow to run here, however below you can find the print screens of the result run locally (the code is in attachement) and the remainder of the table...