Replace globals in disp_th_moments.m by function arguments
parent
f7ae5e4f60
commit
38d293b864
|
@ -106,7 +106,7 @@ if ismember('moments', varargin) % Prior simulations (2nd order moments).
|
||||||
% Solve model
|
% Solve model
|
||||||
[dr,info, M_ ,options_ , oo_] = resol(0, M_ , options_ ,oo_);
|
[dr,info, M_ ,options_ , oo_] = resol(0, M_ , options_ ,oo_);
|
||||||
% Compute and display second order moments
|
% Compute and display second order moments
|
||||||
disp_th_moments(oo_.dr,[]);
|
oo_=disp_th_moments(oo_.dr,[],M_,options_,oo_);
|
||||||
skipline(2)
|
skipline(2)
|
||||||
donesomething = true;
|
donesomething = true;
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
function disp_th_moments(dr,var_list)
|
function oo_=disp_th_moments(dr,var_list,M_,options_,oo_)
|
||||||
% Display theoretical moments of variables
|
% Display theoretical moments of variables
|
||||||
|
|
||||||
% Copyright (C) 2001-2013 Dynare Team
|
% Copyright (C) 2001-2015 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
@ -18,8 +18,6 @@ function disp_th_moments(dr,var_list)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
global M_ oo_ options_
|
|
||||||
|
|
||||||
nodecomposition = options_.nodecomposition;
|
nodecomposition = options_.nodecomposition;
|
||||||
|
|
||||||
if size(var_list,1) == 0
|
if size(var_list,1) == 0
|
||||||
|
|
|
@ -157,7 +157,7 @@ if options_.nomoments == 0
|
||||||
elseif options_.periods == 0
|
elseif options_.periods == 0
|
||||||
% There is no code for theoretical moments at 3rd order
|
% There is no code for theoretical moments at 3rd order
|
||||||
if options_.order <= 2
|
if options_.order <= 2
|
||||||
disp_th_moments(oo_.dr,var_list);
|
oo_=disp_th_moments(oo_.dr,var_list,M_,options_,oo_);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
oo_=disp_moments(oo_.endo_simul,var_list,M_,options_,oo_);
|
oo_=disp_moments(oo_.endo_simul,var_list,M_,options_,oo_);
|
||||||
|
|
Loading…
Reference in New Issue