modification to make it comformable with the changes in resample.m
parent
51c5363850
commit
fefb3528c4
|
@ -1,4 +1,4 @@
|
|||
function indx = traditional_resampling(weights,noise)
|
||||
function return_resample = traditional_resampling(particles,weights,noise)
|
||||
% Resamples particles.
|
||||
|
||||
%@info:
|
||||
|
@ -96,6 +96,12 @@ else
|
|||
indx = indx+1;
|
||||
end
|
||||
|
||||
if particles==0
|
||||
return_resample = indx ;
|
||||
else
|
||||
return_resample = particles(indx,:) ;
|
||||
end
|
||||
|
||||
%@test:1
|
||||
%$ % Define the weights
|
||||
%$ weights = randn(2000,1).^2;
|
||||
|
|
Loading…
Reference in New Issue