For example, the first program is several orders of magnitude faster than the second one.
% The codes with find
for i = 1:NumQuadrats
tic
ind = find(x >= xmin + (i - 1)*step & x < xmin + i*step);
quadrat{i} = [x(ind) y(ind) z(ind)];
x(ind) = [];
y(ind) = [];
z(ind) = [];
fprintf('Quadrat %d has been done !\n', i);
toc
end
% The codes without find
for i = 1:NumQuadrats
index = [];
tic
for j = 1:size(x,1)
if x(j) >= xmin + (i - 1)*step && x(j) < xmin + i*step
quadrat{i} = [quadrat{i};[x(j) y(j) z(j)]];
index = [index;j];
end
end
x(index) = [];
y(index) = [];
z(index) = [];
fprintf('Quadrat %d has been done !\n', i);
toc
end