all_x = cell(20, 1);
N = 10; %The starting number of randomly generated integers
counter = 0;
while N <= 200 %200 is the maximum number of randomly generated integers that I want
x = randi(2^52,N,1); % its 2^52 because I want it to be any number generated
counter = counter + 1;
all_x{counter} = x;
N = N + 10; %each time the number of random integers increases by 10
end
Or better:
all_x = cell(20, 1);
for counter = 1 : 20
N = 10*counter;
x = randi(2^52, N, 1);
all_x{counter} = x;
end
It is necessary to use a cell array here because each time you are generating a different number of points.
An alternative would be to initialize a 200 x 20 array of NaN, and fill in only the part that is appropriate:
all_x = nan(200,20);
for counter = 1 : 20;
N = counter * 10;
x = randi(2^52, N, 1);
all_x(1:N, counter) = x;
end
