From 515e080f49504c1baf60b4746273043fa4a63188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Karaba=29?= Date: Wed, 4 Jan 2017 10:26:22 +0100 Subject: [PATCH] Do not compute static residuals if steady state routine failed. Avoids cryptic model dependent error message. --- matlab/steady.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/matlab/steady.m b/matlab/steady.m index 2ce4ea736..760fb1d3f 100644 --- a/matlab/steady.m +++ b/matlab/steady.m @@ -87,7 +87,13 @@ if info(1) == 0 end else if options_.noprint == 0 - resid; + if ~isempty(steady_state) + resid; + else + skipline() + disp('Residuals of the static equations cannot be computed because the steady state routine returned an empty vector.') + skipline() + end end if options_.debug fprintf('\nThe steady state computation failed. It terminated with the following values:\n')