this is my code
for i=1:100 num = randi([1 75], 1, 5); ex_num = randi([1 15], 1 , 1); x=sort(num); s = horzcat(x, ex_num); table(i,s(1),s(2),s(3),s(4),s(5),s(6),'VariableNames', {'iter' 'first' 'second' 'third' 'fourth' 'fifth' 'extra'}, 'RowNames' ,{'iteration'})end
for i=1:100 num = randi([1 75], 1, 5); ex_num = randi([1 15], 1 , 1); x=sort(num); s = horzcat(x, ex_num); table(i,s(1),s(2),s(3),s(4),s(5),s(6),'VariableNames', {'iter' 'first' 'second' 'third' 'fourth' 'fifth' 'extra'}, 'RowNames' ,{'iteration'}) end
Once I run the code I get what I want, however, I get 100 separate tables instead just getting one continuous table.
Best Answer