Merge branch 'apf' into 'master'

auxiliary_particle_filter.m: set undefined variable

Closes dynare#1718

See merge request Dynare/particles!10
remove-submodule^2
Sébastien Villemot 2020-11-13 11:54:19 +00:00
commit 1d07669551
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ for t=1:sample_size
if (ParticleOptions.resampling.status.generic && neff(weights)<ParticleOptions.resampling.threshold*sample_size) || ParticleOptions.resampling.status.systematic
if pruning
temp = resample([StateVectors' StateVectors_'],weights',ParticleOptions);
number_of_state_variables=size(StateVectors,1);
StateVectors = temp(:,1:number_of_state_variables)';
StateVectors_ = temp(:,number_of_state_variables+1:2*number_of_state_variables)';
else