clear; clc;

 N = [1e1, 1e2, 1e3, 1e4, 1e5, 1e6];
 result = zeros(length(N), 3);

 for i = 1 :length(N)
     
     curr_size = N(i);
     
     tic
     A = [];
     for j = 1 : curr_size
         A = [A, i];
     end
     result(i, 1) = toc;
     
     tic
     B = zeros(curr_size, 1);
     for j = 1 : curr_size
         B(i) = i;
     end
     result(i, 2) = toc;
     
     tic
     C = 1 : curr_size;
     result(i, 3) = toc;
     
 end
 result