From 5b06ad8ae56d80c0eed02a5a2d0dfb5f1770bd28 Mon Sep 17 00:00:00 2001 From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152> Date: Wed, 1 Jul 2009 13:17:44 +0000 Subject: [PATCH] Fixed bug with bvar_forecast under Octave (mkdir doesn't have the implicit "-p" option) git-svn-id: https://www.dynare.org/svn/dynare/trunk@2800 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/bvar_forecast.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matlab/bvar_forecast.m b/matlab/bvar_forecast.m index edd75d63bc..aad3406bf8 100644 --- a/matlab/bvar_forecast.m +++ b/matlab/bvar_forecast.m @@ -155,7 +155,10 @@ function bvar_forecast(nlags) DirectoryName = [ M_.fname '/bvar_forecast' ]; if ~isdir(DirectoryName) - mkdir('.',DirectoryName); + if ~isdir(M_.fname) + mkdir(M_.fname); + end + mkdir(DirectoryName); end save([ DirectoryName '/simulations.mat'], 'sims_no_shock', 'sims_with_shocks'); -- GitLab