MATLAB: Need Help Appending data to a table in every iteration from a for loop .I want to add new data to New_Table every loop but not overwrite the existing data.

append datafor loopnot overwritetable

filename = 'Notes.xls';
sheet = 1;
T = readtable(filename);
App_Names= T(:,4);
Unique_Data = unique(App_Names);
N = height (Unique_Data);
M = height(T);
for j = 1: N
app_name = Unique_Data{j,1}
p = (strcmpi(app_name,T{:,:}))
[row,col] = find(p)
New_Table = [ T(row,1),T(row,2),T(row,3),T(row,4);]
end

Best Answer

T = table(rand(2,1),rand(2,1),'VariableNames',{'Age','Weight'},'RowNames',{'P1','P2'}) ;
for i = 3:10
Tnew = table(rand,rand,'VariableNames',{'Age','Weight'},'RowNames',{['P',num2str(i)]}) ;
T = [T ; Tnew]
end