Added the possibility to use pre and post dynare preprocessor hooks defined by matlab scripts.

time-shift
Stéphane Adjemian (Charybdis) 2013-06-14 23:59:36 +02:00
parent 2d1a1fc742
commit 38f912268a
1 changed files with 10 additions and 1 deletions

View File

@ -96,15 +96,24 @@ if length(d) == 0
error(['DYNARE: can''t open ' fname])
end
% pre-dynare-preprocessor-hook
if exist([fname(1:end-4) '_pre_dynare_preprocessor_hook.m'],'file')
eval([fname(1:end-4) '_pre_dynare_preprocessor_hook'])
end
command = ['"' dynareroot 'dynare_m" ' fname] ;
for i=2:nargin
command = [command ' ' varargin{i-1}];
end
[status, result] = system(command);
disp(result)
% post-dynare-prerocessor-hook
if exist([fname(1:end-4) '_post_dynare_preprocessor_hook.m'],'file')
eval([fname(1:end-4) '_post_dynare_preprocessor_hook'])
end
% Save preprocessor result in logfile (if `no_log' option not present)
no_log = 0;
for i=2:nargin