From 59882e803bff73adbd2cd107b403119b70338802 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Tue, 26 Jul 2022 14:35:36 +0200 Subject: [PATCH] store_smoother_results.m: correctly set input arguments --- matlab/store_smoother_results.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/matlab/store_smoother_results.m b/matlab/store_smoother_results.m index 850832603..534f7ba72 100644 --- a/matlab/store_smoother_results.m +++ b/matlab/store_smoother_results.m @@ -72,6 +72,18 @@ function [oo_, yf]=store_smoother_results(M_,oo_,options_,bayestopt_,dataset_,da % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . +if nargin<15 + PK=[]; +end +if nargin<16 + decomp=[]; +end +gend=dataset_.nobs; +if nargin<17 + Trend=zeros(options_.number_of_observed_variables,gend); +end + + %make sure there are no stale results field_names={'Smoother','SmoothedVariables','UpdatedVariables','FilteredVariables','FilteredVariablesKStepAhead','FilteredVariablesShockDecomposition','FilteredVariablesKStepAheadVariances','SmoothedShocks','SmoothedMeasurementErrors'}; for field_iter=1:length(field_names) @@ -86,10 +98,6 @@ else oo_.Smoother.occbin = false; end -gend=dataset_.nobs; -if nargin<16 - Trend=zeros(options_.number_of_observed_variables,gend); -end if options_.loglinear oo_.Smoother.loglinear = true;