Make datatomfile.m datafiles save name of creator and date

time-shift
Johannes Pfeifer 2016-06-14 17:58:29 +02:00 committed by Stéphane Adjemian (Hermes)
parent 15f95cec4a
commit ed22b6c4f8
1 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@ function datatomfile (s,var_list, names)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2001-2010 Dynare Team % Copyright (C) 2001-2016 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
@ -61,7 +61,9 @@ for i=1:n
ivar(i) = i_tmp; ivar(i) = i_tmp;
end end
end end
stack = dbstack;
fprintf(fid,'%% Dataset generated by %s.\n',stack(2).file);
fprintf(fid,['%% ' datestr(now,0) '\n']);
% Save the selected data. % Save the selected data.
for i = 1:n for i = 1:n
fprintf(fid,[strtrim(names(i,:)), ' = ['],'\n') ; fprintf(fid,[strtrim(names(i,:)), ' = ['],'\n') ;