From c78890d5ca36f339a81c48ef233f62f550a1ec13 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Wed, 20 Jan 2021 17:00:29 +0100
Subject: [PATCH] posterior_sampler_initialization.m: Allow running different
 samplers after each other

Transform error to warning
---
 matlab/posterior_sampler_initialization.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab/posterior_sampler_initialization.m b/matlab/posterior_sampler_initialization.m
index 89b9e96d27..aaddd9b700 100644
--- a/matlab/posterior_sampler_initialization.m
+++ b/matlab/posterior_sampler_initialization.m
@@ -494,7 +494,7 @@ if ~options_.use_mh_covariance_matrix
     if isfield(record,'ProposalCovariance') && isfield(record,'ProposalScaleVec')
         if isfield(record,'MCMC_sampler')
             if ~strcmp(record.MCMC_sampler,options_.posterior_sampler_options.posterior_sampling_method)
-                error(fprintf('Estimation::mcmc: The posterior_sampling_method differs from the one of the original chain. Please reset it to %s',record.MCMC_sampler))
+                warning('Estimation::mcmc: The posterior_sampling_method %s selected differs from the %s of the original chain. This may create problems with the convergence diagnostics.',options_.posterior_sampler_options.posterior_sampling_method,record.MCMC_sampler)
             end
         end
         fprintf('Estimation::mcmc: Recovering the previous proposal density.\n')
-- 
GitLab