From 8683790927d3a2d08a1e0a5d8377e5fbbf2b8cbf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stepan@adjemian.eu>
Date: Thu, 8 Apr 2021 10:48:25 +0200
Subject: [PATCH] Throw error if solve_algo={12,14} is used without JSON
 output.

---
 matlab/backward/simul_backward_model.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/matlab/backward/simul_backward_model.m b/matlab/backward/simul_backward_model.m
index e03ff5ad1c..168b5a4288 100644
--- a/matlab/backward/simul_backward_model.m
+++ b/matlab/backward/simul_backward_model.m
@@ -47,6 +47,10 @@ if ~M_.maximum_lag
     return
 end
 
+if ismember(options_.solve_algo, [12,14]) && ~M_.possible_to_use_solve_algo_12_14
+    error(M_.message_solve_algo_12_14)
+end
+
 if nargin<3
     Innovations = [];
 else
-- 
GitLab