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

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

parent 2d1a1fc7
No related branches found
No related tags found
No related merge requests found
...@@ -96,15 +96,24 @@ if length(d) == 0 ...@@ -96,15 +96,24 @@ if length(d) == 0
error(['DYNARE: can''t open ' fname]) error(['DYNARE: can''t open ' fname])
end 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] ; command = ['"' dynareroot 'dynare_m" ' fname] ;
for i=2:nargin for i=2:nargin
command = [command ' ' varargin{i-1}]; command = [command ' ' varargin{i-1}];
end end
[status, result] = system(command); [status, result] = system(command);
disp(result) 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) % Save preprocessor result in logfile (if `no_log' option not present)
no_log = 0; no_log = 0;
for i=2:nargin for i=2:nargin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment