diff --git a/matlab/check.m b/matlab/check.m index 2ff30e0af..f6a785aa4 100644 --- a/matlab/check.m +++ b/matlab/check.m @@ -1,4 +1,4 @@ -function [result,info] = check(M, options, oo) +function [oo,result,info] = check(M, options, oo) % Checks determinacy conditions by computing the generalized eigenvalues. %@info: @@ -21,6 +21,8 @@ function [result,info] = check(M, options, oo) %! @strong{Outputs} %! @sp 1 %! @table @ @var +%! @item oo +%! Matlab's structure gathering the results (initialized by dynare). %! @item result %! Integer scalar equal to one (BK conditions are satisfied) or zero (otherwise). %! @item info @@ -38,7 +40,7 @@ function [result,info] = check(M, options, oo) %! @end deftypefn %@eod: -% Copyright (C) 2001-2012 Dynare Team +% Copyright (C) 2001-2013 Dynare Team % % This file is part of Dynare. % diff --git a/matlab/smm_objective.m b/matlab/smm_objective.m index 806746369..24adb3c63 100644 --- a/matlab/smm_objective.m +++ b/matlab/smm_objective.m @@ -15,7 +15,7 @@ function [r,flag] = smm_objective(xparams,sample_moments,weighting_matrix,option % SPECIAL REQUIREMENTS % The user has to provide a file where the moment conditions are defined. -% Copyright (C) 2010-2012 Dynare Team +% Copyright (C) 2010-2013 Dynare Team % % This file is part of Dynare. % @@ -75,7 +75,7 @@ save('estimated_parameters.mat','xparams'); % Check for local determinacy of the deterministic steady state. noprint = options_.noprint; options_.noprint = 1; -[local_determinacy_and_stability,info] = check(M_,options_,oo_); options_.noprint = noprint; +[oo_,local_determinacy_and_stability,info] = check(M_,options_,oo_); options_.noprint = noprint; if ~local_determinacy_and_stability r = priorObjectiveValue * (1+info(2)); flag = 0; diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc index cc7553325..4dbdc4ef7 100644 --- a/preprocessor/ComputingTasks.cc +++ b/preprocessor/ComputingTasks.cc @@ -59,7 +59,7 @@ void CheckStatement::writeOutput(ostream &output, const string &basename) const { options_list.writeOutput(output); - output << "check(M_,options_,oo_);\n"; + output << "oo_ = check(M_,options_,oo_);" << endl; } void