From e5171fc089f1f1b95e46820216bec566d51d836e Mon Sep 17 00:00:00 2001 From: Niklas Neubrand <38315848+niklasneubrand@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:42:46 +0200 Subject: [PATCH] Avoid crash of arSimuData arSimu throws warning instead of error for arCalcRes --- arFramework3/Advanced/arSimuData.m | 2 +- arFramework3/arSimu.m | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arFramework3/Advanced/arSimuData.m b/arFramework3/Advanced/arSimuData.m index 53710294..500d54b6 100755 --- a/arFramework3/Advanced/arSimuData.m +++ b/arFramework3/Advanced/arSimuData.m @@ -103,7 +103,7 @@ function arSimuData(m, jplot, tpoints, randomseed) % simulate model -arSimu(false, false, true, false); +arSimu(false, false, true); ar.pTrue = ar.p; % simulate data diff --git a/arFramework3/arSimu.m b/arFramework3/arSimu.m index 81bc06e6..ab8ae4ec 100755 --- a/arFramework3/arSimu.m +++ b/arFramework3/arSimu.m @@ -268,7 +268,11 @@ if(~fine) % arCalcRes_test; % the test can be performed here or outside of arSimu % (see comments in arCalcRes_test.m) - arCalcRes(sensi) + try + arCalcRes(sensi) + catch ME + warning(getReport(ME, 'extended', 'hyperlinks', 'on')); + end %calculate y_scale_max if(ar.config.atolV)