diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index f0a4636c6..11a754d0f 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -68,9 +68,9 @@ for i = 1:options_.number_of_observed_variables end % Check that a variable is not declared as observed more than once. -if ~isequal(options_.varobs,unique(options_.varobs)) +if length(unique(options_.varobs))1 + if length(strmatch(options_.varobs{i},options_.varobs,'exact'))>1 error(['A variable cannot be declared as observed more than once (' options_.varobs{i} ')!']) end end