Home > matlab > make_ex_.m

make_ex_

PURPOSE ^

forms oo_.exo_simul and oo_.exo_det_simul

SYNOPSIS ^

function make_ex_

DESCRIPTION ^

 forms oo_.exo_simul and oo_.exo_det_simul

 INPUTS
   none
    
 OUTPUTS
   none

 ALGORITHM
   
 SPECIAL REQUIREMENTS

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function make_ex_
0002 % forms oo_.exo_simul and oo_.exo_det_simul
0003 %
0004 % INPUTS
0005 %   none
0006 %
0007 % OUTPUTS
0008 %   none
0009 %
0010 % ALGORITHM
0011 %
0012 % SPECIAL REQUIREMENTS
0013 %
0014 
0015 % Copyright (C) 1996-2011 Dynare Team
0016 %
0017 % This file is part of Dynare.
0018 %
0019 % Dynare is free software: you can redistribute it and/or modify
0020 % it under the terms of the GNU General Public License as published by
0021 % the Free Software Foundation, either version 3 of the License, or
0022 % (at your option) any later version.
0023 %
0024 % Dynare is distributed in the hope that it will be useful,
0025 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0026 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0027 % GNU General Public License for more details.
0028 %
0029 % You should have received a copy of the GNU General Public License
0030 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0031 
0032 global M_ options_ oo_ ex0_ ex_det0_
0033 
0034 if isempty(oo_.exo_steady_state)
0035     oo_.exo_steady_state = zeros(M_.exo_nbr,1);
0036 end
0037 if M_.exo_det_nbr > 1 && isempty(oo_.exo_det_steady_state)
0038     oo_.exo_det_steady_state = zeros(M_.exo_det_nbr,1);
0039 end
0040 if isempty(oo_.exo_simul)
0041     if isempty(ex0_)
0042         oo_.exo_simul = repmat(oo_.exo_steady_state',M_.maximum_lag+options_.periods+M_.maximum_lead,1);
0043     else
0044         oo_.exo_simul = [ repmat(ex0_',M_.maximum_lag,1) ; repmat(oo_.exo_steady_state',options_.periods+M_.maximum_lead,1) ];
0045     end
0046 elseif size(oo_.exo_simul,1) < M_.maximum_lag+M_.maximum_lead+options_.periods
0047     oo_.exo_simul = [ oo_.exo_simul ; repmat(oo_.exo_steady_state',M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.exo_simul,1),1) ];
0048 end
0049 
0050 if M_.exo_det_nbr > 0
0051     if isempty(oo_.exo_det_simul)
0052         if isempty(ex_det0_)
0053             oo_.exo_det_simul = [ones(M_.maximum_lag+options_.periods+M_.maximum_lead,1)*oo_.exo_det_steady_state'];
0054         else
0055             oo_.exo_det_simul = [ones(M_.maximum_lag,1)*ex_det0_';ones(options_.periods+M_.maximum_lead,1)*oo_.exo_det_steady_state'];
0056         end
0057     elseif size(oo_.exo_det_simul,1) < M_.maximum_lag+M_.maximum_lead+options_.periods
0058         oo_.exo_det_simul = [oo_.exo_det_simul; ones(M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.exo_det_simul,1),1)*oo_.exo_det_steady_state'];
0059     end
0060 end

Generated on Mon 21-May-2012 02:42:43 by m2html © 2005