i am doing a resampling problem in which i am trying to assign xp(j) to x(i) but the problem is both my xp and x are [2:1] ... how can i solve this problem .. please help ?? Thanks
for i = 1 : N u = rand; % uniform random number between 0 and 1 qs = 0; for j = 1 : N qs = qs+ q(j); if qs >= u x(i)= xp(j); break; end end end
No products are associated with this question.