From ad0bff3771730f76cec1d568d7cdd7ec94a131da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Wed, 24 Jan 2018 17:24:21 +0100
Subject: [PATCH] Added comments.

---
 matlab/evaluate_steady_state_file.m | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/matlab/evaluate_steady_state_file.m b/matlab/evaluate_steady_state_file.m
index cecf3ec50..be84e6f39 100644
--- a/matlab/evaluate_steady_state_file.m
+++ b/matlab/evaluate_steady_state_file.m
@@ -70,9 +70,14 @@ else
     updated_params_flag = 0;
 end
 
-if M.set_auxiliary_variables %otherwise Octave may crash, see https://savannah.gnu.org/bugs/?52568
+if M.set_auxiliary_variables
+    % Define function handle for the function setting the auxiliary
+    % variables only if the model has auxiliary variables. Otherwise
+    % Octave may crash (see https://savannah.gnu.org/bugs/?52568) because
+    % the function does not exist in the path.
     h_set_auxiliary_variables = str2func([M.fname '_set_auxiliary_variables']);
 end
+
 if  isnan(updated_params_flag) || (updated_params_flag  && any(isnan(params(~isnan(params))-params1(~isnan(params))))) %checks if new NaNs were added
     info(1) = 24;
     info(2) = NaN;
-- 
GitLab