From eed3651d6eabb616739e9bf880b7ff04647a0770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 15 Jan 2013 16:45:15 +0100 Subject: [PATCH] check only returns eigenvalues, not the whole oo_ --- matlab/check.m | 8 +++----- matlab/smm_objective.m | 2 +- preprocessor/ComputingTasks.cc | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/matlab/check.m b/matlab/check.m index f6a785aa4..d68f7f641 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,options); [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 24adb3c63..030cb98d9 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 4dbdc4ef7..92a4b7d59 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