clear; clc;

N = 1e7;

% tic
% x1 = [];
% for i = 1 : N
%     x1 = [x1, i ^ 2];
% end
% toc

tic
x2 = zeros(1, N);
for i = 1 : N
    x2(i) = sin(i ^ 2);
end
toc

tic
t = 1 : N;
x3 = sin(t .^ 2);
toc