Skip to content
Snippets Groups Projects
Commit d759023f authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Add comments.

parent 45d4dcf6
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,8 @@ function write_steady_state(output, DynareModel, DynareOutput) ...@@ -7,6 +7,8 @@ function write_steady_state(output, DynareModel, DynareOutput)
% - DynareModel [struct] aka M_ % - DynareModel [struct] aka M_
% - DynareOutput [struct] aka oo_ % - DynareOutput [struct] aka oo_
% Copyright (C) 2024 by Stéphane ADjemian
fid = fopen(output, 'w'); fid = fopen(output, 'w');
fprintf(fid, '// File generated on %s.', char(datetime)); fprintf(fid, '// File generated on %s.', char(datetime));
skipline(2, fid) skipline(2, fid)
......
function write_table_short(datafile, texfilename) function write_table_short(datafile, texfilename)
% Copyright (C) 2024 by Stéphane Adjemian
stack_solve_algo = [0, 1, 2, 3, 4, 5]; stack_solve_algo = [0, 1, 2, 3, 4, 5];
id = 1:length(stack_solve_algo); id = 1:length(stack_solve_algo);
...@@ -21,11 +22,11 @@ for algo = [0, 1] ...@@ -21,11 +22,11 @@ for algo = [0, 1]
if ~isnan(MATLAB_computing(id(stack_solve_algo==algo), 1)) if ~isnan(MATLAB_computing(id(stack_solve_algo==algo), 1))
switch MATLAB_computing(id(stack_solve_algo==algo), 1) switch MATLAB_computing(id(stack_solve_algo==algo), 1)
case -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 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 case -3
T = strrep(T, sprintf('{a%u_mat}', algo), 'CRASH'); T = strrep(T, sprintf('{a%u_mat}', algo), 'CRASH'); % matlab crash
otherwise otherwise
T = strrep(T, sprintf('{a%u_mat}', algo), int2str(MATLAB_computing(id(stack_solve_algo==algo), 1))); T = strrep(T, sprintf('{a%u_mat}', algo), int2str(MATLAB_computing(id(stack_solve_algo==algo), 1)));
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment