From d759023fc335dcced0a1565d506df48f7eec1231 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Argos=29?=
 <stepan@adjemian.eu>
Date: Mon, 27 May 2024 18:44:27 +0200
Subject: [PATCH] Add comments.

---
 matlab/write_steady_state.m | 2 ++
 matlab/write_table_short.m  | 7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/matlab/write_steady_state.m b/matlab/write_steady_state.m
index 9c0e1b7..8406915 100644
--- a/matlab/write_steady_state.m
+++ b/matlab/write_steady_state.m
@@ -7,6 +7,8 @@ function write_steady_state(output, DynareModel, DynareOutput)
 % - DynareModel   [struct] aka M_
 % - DynareOutput  [struct] aka oo_
 
+% Copyright (C) 2024 by Stéphane ADjemian
+
 fid = fopen(output, 'w');
 fprintf(fid, '// File generated on %s.', char(datetime));
 skipline(2, fid)
diff --git a/matlab/write_table_short.m b/matlab/write_table_short.m
index 90e2008..03c53cd 100644
--- a/matlab/write_table_short.m
+++ b/matlab/write_table_short.m
@@ -1,4 +1,5 @@
 function write_table_short(datafile, texfilename)
+% Copyright (C) 2024 by Stéphane Adjemian
 
 stack_solve_algo = [0, 1, 2, 3, 4, 5];
 id = 1:length(stack_solve_algo);
@@ -21,11 +22,11 @@ for algo = [0, 1]
     if ~isnan(MATLAB_computing(id(stack_solve_algo==algo), 1))
         switch MATLAB_computing(id(stack_solve_algo==algo), 1)
           case -1
-            T = strrep(T, sprintf('{a%u_mat}', algo), 'crash');
+            T = strrep(T, sprintf('{a%u_mat}', algo), 'crash');  % code crash
           case -2
-            T = strrep(T, sprintf('{a%u_mat}', algo), 'FAIL');
+            T = strrep(T, sprintf('{a%u_mat}', algo), 'FAIL');   % algorithm did not converge
           case -3
-            T = strrep(T, sprintf('{a%u_mat}', algo), 'CRASH');
+            T = strrep(T, sprintf('{a%u_mat}', algo), 'CRASH');  % matlab crash
           otherwise
             T = strrep(T, sprintf('{a%u_mat}', algo), int2str(MATLAB_computing(id(stack_solve_algo==algo), 1)));
         end
-- 
GitLab