From 249c2ca7ad8d6eb6b8212bc48d0422d613c3db19 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Mon, 8 Jun 2015 09:31:27 +0200
Subject: [PATCH] Force sampling from uniform distribution for ML in
 stab_map_.m

---
 matlab/gsa/stab_map_.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/matlab/gsa/stab_map_.m b/matlab/gsa/stab_map_.m
index 7be2d9f665..85ef367612 100644
--- a/matlab/gsa/stab_map_.m
+++ b/matlab/gsa/stab_map_.m
@@ -107,6 +107,10 @@ else  % estimated parameters but no declared priors
     % maximum likelihood with inequality constraints for the parameters.
     bounds.lb = lb;
     bounds.ub = ub;
+    if opt_gsa.prior_range==0
+        warning('GSA:: When using ML, sampling from the prior is not possible. Setting prior_range=1')
+        opt_gsa.prior_range=1;
+    end
 end
 
 if nargin==0,
-- 
GitLab