function [x vahy]=my_resample(x,vahy) N=size(x,2); index=my_sample(vahy,1:N); x=x(:,index); vahy=1/N*ones(1,N); end