diff --git a/matlab/check.m b/matlab/check.m index 54f6fd9f43b5b9a330448fe8e395f038c58c33b4..ede7047f7de801b3113ec1a7fc7777957ea310b9 100644 --- a/matlab/check.m +++ b/matlab/check.m @@ -1,4 +1,4 @@ -function [oo,result,info] = check(M, options, oo) +function [eigenvalues_,result,info] = check(M, options, oo) % Checks determinacy conditions by computing the generalized eigenvalues. %@info: @@ -21,8 +21,8 @@ function [oo,result,info] = check(M, options, oo) %! @strong{Outputs} %! @sp 1 %! @table @ @var -%! @item oo -%! Matlab's structure gathering the results (initialized by dynare). +%! @item eigenvalues_ +%! Eigenvalues of the model. %! @item result %! Integer scalar equal to one (BK conditions are satisfied) or zero (otherwise). %! @item info @@ -72,8 +72,6 @@ oo.dr=set_state_space(oo.dr,M); [dr,info,M,options,oo] = resol(1,M,options,oo); -oo.dr = dr; - if info(1) ~= 0 && info(1) ~= 3 && info(1) ~= 4 print_info(info, options.noprint); end diff --git a/matlab/smm_objective.m b/matlab/smm_objective.m index 24adb3c63ec2bcecb1eb4741e9b0b062e46bab69..030cb98d9ee47f035d3a5431f79dbfe28994de90 100644 --- a/matlab/smm_objective.m +++ b/matlab/smm_objective.m @@ -75,7 +75,7 @@ save('estimated_parameters.mat','xparams'); % Check for local determinacy of the deterministic steady state. noprint = options_.noprint; options_.noprint = 1; -[oo_,local_determinacy_and_stability,info] = check(M_,options_,oo_); options_.noprint = noprint; +[eigval,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 8c42f28e1c0d90114962d3a05641d107510fb268..5f8098433199654db2dc6f102dad420dd6ca9fa1 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 << "oo_ = check(M_,options_,oo_);" << endl; + output << "oo_.dr.eigval = check(M_,options_,oo_);" << endl; } void