Commit c8c7b9fa authored by Frédéric Karamé's avatar Frédéric Karamé
Browse files

minor modifications.

parent eb9bc512
......@@ -34,7 +34,7 @@ function indx = resample(weights,method1,method2)
%! @end deftypefn
%@eod:
% Copyright (C) 2011-2012 Dynare Team
% Copyright (C) 2011, 2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -56,7 +56,13 @@ function indx = resample(weights,method1,method2)
switch method1
case 'residual'
indx = residual_resampling(weights);
if strcmpi(method2,'kitagawa')
indx = residual_resampling(weights,rand);
elseif strcmpi(method2,'stratified')
indx = residual_resampling(weights,rand(size(weights)));
else
error('particle::resample: Unknown method!')
end
case 'traditional'
if strcmpi(method2,'kitagawa')
indx = traditional_resampling(weights,rand);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment