From 91eb4663696707fb5f651cf2e76699b72e5cba86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Sedna=29?= Date: Fri, 6 May 2011 15:53:48 +0200 Subject: [PATCH] Added an error message when a variable is declared as oibserved more than once. --- matlab/dynare_estimation_init.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index bc5fce7a9..5b174fbac 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -44,7 +44,6 @@ else if ~isempty(strmatch('dsge_prior_weight',M_.param_names)) options_.dsge_var = 1; end - var_list_ = check_list_of_variables(options_, M_, var_list_); options_.varlist = var_list_; end @@ -53,6 +52,10 @@ options_.lgyidx2varobs = zeros(size(M_.endo_names,1),1); for i = 1:size(M_.endo_names,1) tmp = strmatch(deblank(M_.endo_names(i,:)),options_.varobs,'exact'); if ~isempty(tmp) + if length(tmp)>1 + disp(' ') + error(['Multiple declarations of ' deblank(M_.endo_names(i,:)) ' as an observed variable is not allowed!']) + end options_.lgyidx2varobs(i,1) = tmp; end end