From b3fb320b74893c11ea5fb1f9b295e01614f648d4 Mon Sep 17 00:00:00 2001 From: adjemian Date: Sat, 1 Oct 2005 09:17:40 +0000 Subject: [PATCH] added CheckPath.m git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@471 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/CheckPath.m | 9 +++++++++ matlab/irf.m | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 matlab/CheckPath.m diff --git a/matlab/CheckPath.m b/matlab/CheckPath.m new file mode 100644 index 000000000..87ad27875 --- /dev/null +++ b/matlab/CheckPath.m @@ -0,0 +1,9 @@ +function DirectoryName = CheckPath(type) +% 06-03-2005 +global M_ + +DirectoryName = [ M_.dname '\' type ]; + +if ~isdir(DirectoryName) + system([ 'md ' DirectoryName]); +end \ No newline at end of file diff --git a/matlab/irf.m b/matlab/irf.m index 12916b69b..53480efca 100644 --- a/matlab/irf.m +++ b/matlab/irf.m @@ -17,7 +17,7 @@ function y_=irf(dr, e1, long_, drop_, replic, iorder) else % eliminate shocks with 0 variance - i_exo_var = setdiff([1:M_.exo_nbr],find(diag(M_.Sigma_e) == 0)); + i_exo_var = setdiff([1:M_.exo_nbr],find(diag(M_.Sigma_e) == 0 )); nxs = length(i_exo_var); ex1_ = zeros(long_+drop_+M_.maximum_lag,M_.exo_nbr); ex2_ = ex1_; @@ -35,9 +35,7 @@ function y_=irf(dr, e1, long_, drop_, replic, iorder) y_=y_/replic; end options_.periods = old_iter; - % 01/18/02 MJ corrected for many lags -% 03/11/22 MJ input is now entire shock vector e1 (for orthogonalized -% IRFs) +% 03/11/22 MJ input is now entire shock vector e1 (for orthogonalized IRFs)