From 2254f846c5bc4aaf8e569f9dff40bcee6e4c3429 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 24 Nov 2014 12:26:10 +0100 Subject: [PATCH] bug fix: remove consecutive plus signs --- tests/optimal_policy/osr_example_objective_correctness.mod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/optimal_policy/osr_example_objective_correctness.mod b/tests/optimal_policy/osr_example_objective_correctness.mod index 539fc609b..a060bf6b1 100644 --- a/tests/optimal_policy/osr_example_objective_correctness.mod +++ b/tests/optimal_policy/osr_example_objective_correctness.mod @@ -60,7 +60,7 @@ end; osr; %compute objective function manually -objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))++oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+0.5*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact')); +objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))+oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+0.5*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact')); if abs(oo_.osr.objective_function-objective)>1e-8 error('Objective Function is wrong') end @@ -80,7 +80,7 @@ end; osr; %compute objective function manually -objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))++oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+1*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact')); +objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))+oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+1*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact')); if abs(oo_.osr.objective_function-objective)>1e-8 error('Objective Function is wrong') end @@ -107,4 +107,4 @@ if abs(oo_.osr.objective_function-oo_covar_single.osr.objective_function)>1e-8 end if max(abs(cell2mat(struct2cell(oo_.osr.optim_params))-cell2mat(struct2cell(oo_covar_single.osr.optim_params))))>1e-5 error('Parameters should be identical') -end \ No newline at end of file +end