Commit fbec03fe authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug related to the shape of the weights vector in paricle filter with pruning.

parent 08feada8
......@@ -156,8 +156,8 @@ for t=1:sample_size
if (strcmp(DynareOptions.particle.resampling.status,'generic') && neff(weights)<DynareOptions.particle.resampling.neff_threshold*sample_size ) || ...
if pruning
temp = resample([tmp(mf0,:)' tmp_(mf0,:)'],weights,DynareOptions);
StateVectors = temp(:,1:number_of_state_variables)' ;
temp = resample([tmp(mf0,:)' tmp_(mf0,:)'],weights',DynareOptions);
StateVectors = temp(:,1:number_of_state_variables)';
StateVectors_ = temp(:,number_of_state_variables+1:2*number_of_state_variables)';
StateVectors = resample(tmp(mf0,:)',weights',DynareOptions)';
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