diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m index 5d31c8b01..0938d9aba 100644 --- a/matlab/dynare_config.m +++ b/matlab/dynare_config.m @@ -66,7 +66,7 @@ if ~exist('OCTAVE_VERSION') addpath([dynareroot '/missing/rows_columns']) % Replacement for vec() (inexistent under MATLAB) addpath([dynareroot '/missing/vec']) - if ~license('test', 'statistics_toolbox') + if isempty(license('inuse','statistics_toolbox')) % Replacements for functions of the stats toolbox addpath([dynareroot '/missing/stats/']) end @@ -96,7 +96,7 @@ if exist('OCTAVE_VERSION') addpath([dynareroot '/missing/nanmean']) end else - if ~license('test', 'statistics_toolbox') + if isempty(license('inuse','statistics_toolbox')) addpath([dynareroot '/missing/nanmean']) end end diff --git a/matlab/dynare_solve.m b/matlab/dynare_solve.m index 45463f283..bf6a68f48 100644 --- a/matlab/dynare_solve.m +++ b/matlab/dynare_solve.m @@ -38,7 +38,7 @@ global options_ options_ = set_default_option(options_,'solve_algo',2); info = 0; if options_.solve_algo == 0 - if ~exist('OCTAVE_VERSION') && ~license('test', 'optimization_toolbox') + if ~exist('OCTAVE_VERSION') && isempty(license('inuse','optimization_toolbox')) error('You can''t use solve_algo=0 since you don''t have MATLAB''s Optimization Toolbox') end options=optimset('fsolve');