function x=supboxvector2(x,Q,p)
% r=1 for each parameters
y=zeros(1,Q);
for i=1:length(p)
%for w=1:r
dinf=find (x<=p(1,i));
dsup=find (x>p(1,i));
y(dinf)=ceil((Q*x(dinf))./p(1,i));
y(dsup)=floor((Q*(Q-x(dsup)))./(Q-p(1,i)))+1;  
x=y;
%end
end
