From 09cf77c3d50d72502fdf6f53ddda497b96e17e5b Mon Sep 17 00:00:00 2001 From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152> Date: Fri, 5 Sep 2008 16:09:59 +0000 Subject: [PATCH] v4.0: fixed problems with global variables git-svn-id: https://www.dynare.org/svn/dynare/branches/4.0@2045 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/CutSample.m | 2 -- matlab/GetPosteriorParametersStatistics.m | 2 -- matlab/PlotPosteriorDistributions.m | 2 -- matlab/dynare_estimation.m | 2 +- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/matlab/CutSample.m b/matlab/CutSample.m index bfbfeeed92..845bed8b81 100644 --- a/matlab/CutSample.m +++ b/matlab/CutSample.m @@ -31,8 +31,6 @@ function CutSample(M_, options_, estim_params_) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -global M_ options_ estim_params_ - npar = estim_params_.np+estim_params_.nvn+estim_params_.ncx+estim_params_.ncn+estim_params_.nvx; DirectoryName = CheckPath('metropolis'); diff --git a/matlab/GetPosteriorParametersStatistics.m b/matlab/GetPosteriorParametersStatistics.m index 7f6abec491..a0bec03f97 100644 --- a/matlab/GetPosteriorParametersStatistics.m +++ b/matlab/GetPosteriorParametersStatistics.m @@ -32,8 +32,6 @@ function oo_ = GetPosteriorParametersStatistics(estim_params_, M_, options_, bay % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -global estim_params_ M_ options_ bayestopt_ oo_ - %if ~options_.mh_replic & options_.load_mh_file % load([M_.fname '_results.mat'],'oo_'); %end diff --git a/matlab/PlotPosteriorDistributions.m b/matlab/PlotPosteriorDistributions.m index 1d1cac5e59..190aaccf5d 100644 --- a/matlab/PlotPosteriorDistributions.m +++ b/matlab/PlotPosteriorDistributions.m @@ -33,8 +33,6 @@ function oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -global estim_params_ M_ options_ bayestopt_ oo_ - OutputDirectoryName = CheckPath('Output'); TeX = options_.TeX; diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m index 4018782e16..1ed04fa0de 100644 --- a/matlab/dynare_estimation.m +++ b/matlab/dynare_estimation.m @@ -924,7 +924,7 @@ if (any(bayestopt_.pshape >0 ) & options_.mh_replic) | ... McMCDiagnostics(options_, estim_params_, M_); end %% Here i discard first half of the draws: - CutSample; + CutSample(M_, options_, estim_params_); %% Estimation of the marginal density from the Mh draws: if options_.mh_replic [marginal,oo_] = marginal_density(M_, options_, estim_params_, oo_); -- GitLab