From f5037df3cd807366bad1604fd37bcfa74cd520ff Mon Sep 17 00:00:00 2001 From: stepan Date: Fri, 23 Oct 2009 10:03:03 +0000 Subject: [PATCH] Cosmetic changes. git-svn-id: https://www.dynare.org/svn/dynare/trunk@3073 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/make_ex_.m | 28 +++++++++++++--------------- matlab/make_y_.m | 5 +++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/matlab/make_ex_.m b/matlab/make_ex_.m index b722a095f..a07dfbbb1 100644 --- a/matlab/make_ex_.m +++ b/matlab/make_ex_.m @@ -1,18 +1,18 @@ - function make_ex_ -% function make_ex_ % forms oo_.exo_simul and oo_.exo_det_simul +% % INPUTS -% ... -% OUTPUTS -% ... -% ALGORITHM -% ... -% SPECIAL REQUIREMENTS % none +% +% OUTPUTS +% none +% +% ALGORITHM +% +% SPECIAL REQUIREMENTS % -% Copyright (C) 1996-2007 Dynare Team +% Copyright (C) 1996-2009 Dynare Team % % This file is part of Dynare. % @@ -41,12 +41,12 @@ function make_ex_ end if isempty(oo_.exo_simul) if isempty(ex0_) - oo_.exo_simul = [ones(M_.maximum_lag+options_.periods+M_.maximum_lead,1)*oo_.exo_steady_state']; + oo_.exo_simul = repmat(oo_.exo_steady_state',M_.maximum_lag+options_.periods+M_.maximum_lead,1); else - oo_.exo_simul = [ones(M_.maximum_lag,1)*ex0_';ones(options_.periods+M_.maximum_lead,1)*oo_.exo_steady_state']; + oo_.exo_simul = [ repmat(ex0_',M_.maximum_lag,1) ; repmat(oo_.exo_steady_state',options_.periods+M_.maximum_lead,1) ]; end elseif size(oo_.exo_simul,1) < M_.maximum_lag+M_.maximum_lead+options_.periods - oo_.exo_simul = [oo_.exo_simul; ones(M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.exo_simul,1),1)*oo_.exo_steady_state']; + 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) ]; end if M_.exo_det_nbr > 0 @@ -59,6 +59,4 @@ function make_ex_ elseif size(oo_.exo_det_simul,1) < M_.maximum_lag+M_.maximum_lead+options_.periods 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']; end - end - - \ No newline at end of file + end \ No newline at end of file diff --git a/matlab/make_y_.m b/matlab/make_y_.m index 72cfd6bda..b0cba6eb1 100644 --- a/matlab/make_y_.m +++ b/matlab/make_y_.m @@ -58,7 +58,8 @@ function make_y_ y0 = oo_.endo_simul(:,1:M_.maximum_lag); oo_.endo_simul=simult_(y0,dr,exogenous_variables,1); options_ = oldopt; - case 2% Homotopic mod - % Leave endo_simul as it is. + case 2% Homotopic mod: Leave endo_simul as it is. + otherwise + error('Unknown method.') end end \ No newline at end of file