Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
...@@ -156,7 +156,7 @@ for t=1:sample_size ...@@ -156,7 +156,7 @@ for t=1:sample_size
if (strcmp(DynareOptions.particle.resampling.status,'generic') && neff(weights)<DynareOptions.particle.resampling.neff_threshold*sample_size ) || ... if (strcmp(DynareOptions.particle.resampling.status,'generic') && neff(weights)<DynareOptions.particle.resampling.neff_threshold*sample_size ) || ...
strcmp(DynareOptions.particle.resampling.status,'systematic') strcmp(DynareOptions.particle.resampling.status,'systematic')
if pruning if pruning
temp = resample([tmp(mf0,:)' tmp_(mf0,:)'],weights,DynareOptions); temp = resample([tmp(mf0,:)' tmp_(mf0,:)'],weights',DynareOptions);
StateVectors = temp(:,1:number_of_state_variables)'; StateVectors = temp(:,1:number_of_state_variables)';
StateVectors_ = temp(:,number_of_state_variables+1:2*number_of_state_variables)'; StateVectors_ = temp(:,number_of_state_variables+1:2*number_of_state_variables)';
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment