function y=clip(x,p)
%x es el vector a clipear
%p es el porcentaje
a=max(x(1:round(length(x)/3)));
b=max(x(round(length(x)/3)+1:round(2/3*length(x))));
c=max(x(round(2/3*length(x)+1:length(x))));
maximo=min([a b c]);
for i=1:length(x)
   if abs(x(i))<maximo*p/100
      x(i)=0;
   end
end
y=x;
