Commit e905ff77 authored by Stéphane Adjemian's avatar Stéphane Adjemian Committed by Stéphane Adjemian
Browse files

Added two new modes for displaying documentation or testing matlab/octave routines.

Examples:

dynare --doc <NAME_OF_A_MATLAB_ROUTINE> will display internal documentation of the routine.

dynare --test <NAME_OF_MATLAB_ROUTINE> ... will test the routine(s)

Note that for displaying the internal documentation texinfo must be installed on the system,
because dynare calls makeinfo with --plaintext option.
parent fe59061e
......@@ -76,6 +76,34 @@ if exist('OCTAVE_VERSION')
default_save_options('-mat')
end
% Escape if test or doc flag
if strcmpi(fname,'--test')
if nargin>1
dynare_config([],0);
number_of_matlab_routines = length(varargin);
for i=1:number_of_matlab_routines
dynTest(varargin{i});
end
else
disp('You have to specify at least one matlab routine after --test flag!')
end
return
end
if strcmpi(fname,'--doc')
if nargin==2
dynare_config([],0);
dynInfo(varargin{1})
else
if nargin<2
disp('You have to specify a matlab routine after --doc flag!')
else
disp('I can only show internal documentation for one matlab routine!')
end
end
return
end
% detect if MEX files are present; if not, use alternative M-files
dynareroot = dynare_config;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment