Home > matlab > make_y_.m

make_y_

PURPOSE ^

function make_y_

SYNOPSIS ^

function make_y_

DESCRIPTION ^

 function make_y_
 forms oo_.endo_simul as guess values for deterministic simulations
  
 INPUTS
   ...
 OUTPUTS
   ...
 ALGORITHM
   ...
 SPECIAL REQUIREMENTS
   none

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function make_y_
0002 % function make_y_
0003 % forms oo_.endo_simul as guess values for deterministic simulations
0004 %
0005 % INPUTS
0006 %   ...
0007 % OUTPUTS
0008 %   ...
0009 % ALGORITHM
0010 %   ...
0011 % SPECIAL REQUIREMENTS
0012 %   none
0013 %
0014 
0015 % Copyright (C) 1996-2009 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_ ys0_ 
0033 
0034 if options_.steadystate_flag
0035     [oo_.steady_state,M_.params,check] = ...
0036         evaluate_steady_state_file(oo_.steady_state,oo_.exo_steady_state,M_, ...
0037                                    options_);
0038 end
0039 
0040 if isempty(oo_.steady_state)
0041     oo_.steady_state = zeros(M_.endo_nbr,1);
0042 end
0043 
0044 if isempty(M_.endo_histval)
0045     if isempty(ys0_)
0046         oo_.endo_simul = [oo_.steady_state*ones(1,M_.maximum_lag+options_.periods+M_.maximum_lead)];
0047     else
0048         oo_.endo_simul = [ys0_*ones(1,M_.maximum_lag) oo_.steady_state*ones(1,options_.periods+M_.maximum_lead)];
0049     end
0050 else
0051     if ~isempty(ys0_)
0052         error('histval and endval cannot be used simultaneously')
0053     end
0054     oo_.endo_simul = [M_.endo_histval ...
0055                       oo_.steady_state*ones(1,options_.periods+M_.maximum_lead)];
0056 end

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