Commit eed3651d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

check only returns eigenvalues, not the whole oo_

parent 42c91151
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
......
......@@ -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;
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment