From 80c72ea46bd257c18d0f7de173457ac4fa3d5762 Mon Sep 17 00:00:00 2001
From: Willi Mutschler <willi@mutschler.eu>
Date: Mon, 18 Dec 2023 10:03:57 +0100
Subject: [PATCH] :bug: Fix bug in #4a6783

options_ is missing as an input argument for compute_posterior_covariance_matrix
---
 matlab/estimation/check_posterior_sampler_options.m | 2 +-
 matlab/estimation/marginal_density.m                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/matlab/estimation/check_posterior_sampler_options.m b/matlab/estimation/check_posterior_sampler_options.m
index e7fab78d69..c0d4235ff1 100644
--- a/matlab/estimation/check_posterior_sampler_options.m
+++ b/matlab/estimation/check_posterior_sampler_options.m
@@ -464,7 +464,7 @@ if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
 end
 
 if options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix
-    [~, invhess] = compute_posterior_covariance_matrix(bayestopt_.name, fname, dname, outputFolderName);
+    [~, invhess] = compute_posterior_covariance_matrix(bayestopt_.name, fname, dname, options_, outputFolderName);
     posterior_sampler_options.invhess = invhess;
 end
 
diff --git a/matlab/estimation/marginal_density.m b/matlab/estimation/marginal_density.m
index 26e45e5260..eb8443a343 100644
--- a/matlab/estimation/marginal_density.m
+++ b/matlab/estimation/marginal_density.m
@@ -51,7 +51,7 @@ TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
 TODROP = floor(options_.mh_drop*TotalNumberOfMhDraws);
 
 fprintf('marginal density: I''m computing the posterior mean and covariance... ');
-[posterior_mean, posterior_covariance, posterior_mode, posterior_kernel_at_the_mode] = compute_posterior_covariance_matrix(bayestopt_.name, M_.fname, M_.dname, outputFolderName);
+[posterior_mean, posterior_covariance, posterior_mode, posterior_kernel_at_the_mode] = compute_posterior_covariance_matrix(bayestopt_.name, M_.fname, M_.dname, options_, outputFolderName);
 
 MU = transpose(posterior_mean);
 SIGMA = posterior_covariance;
-- 
GitLab