close all; clear; clc

x = randi(1000, [1000000, 1]);

tic
y = zeros(size(x));
for i = 1:length(x)
    y(i) = sqrt(x(i));
end
toc

clear y

tic
y = sqrt(x);
toc