From 6542ce4a1621dcebbf07adaa172206cc5c7abf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 29 Jan 2020 17:05:37 +0100 Subject: [PATCH] datatomfile: fix the name of the .mod file at the top of the generated file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the new layout of the files generated by the preprocessor, it would always print “driver.m”, which is not very informative. --- matlab/datatomfile.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/matlab/datatomfile.m b/matlab/datatomfile.m index 4cff2b26a..3b50ab6b5 100644 --- a/matlab/datatomfile.m +++ b/matlab/datatomfile.m @@ -17,7 +17,7 @@ function datatomfile (s, var_list, names) % provided, all the variables as defined in M_.endo_names will be saved in % the generated m file. -% Copyright (C) 2001-2018 Dynare Team +% Copyright (C) 2001-2020 Dynare Team % % This file is part of Dynare. % @@ -68,8 +68,7 @@ for i=1:n ivar(i) = i_tmp; end end -stack = dbstack; -fprintf(fid,'%% Dataset generated by %s.\n',stack(2).file); +fprintf(fid,'%% Dataset generated by %s.mod\n',M_.fname); fprintf(fid,['%% ' datestr(now,0) '\n']); % Save the selected data. for i = 1:n