function y = mezclar(index)

top = length(index);
while (top > 0)
    x = rand;
    x = x*top;
    select = ceil(x);
    tmp = index(select);
    index(select) = index(top);
    index(top) = tmp;
    top = top - 1;
end
y = index;