Improve the way we test for existence of toolboxes (more reliable in the case where the toolbox is installed but not activated)
parent
013c599ec9
commit
c07a915d6e
|
@ -66,7 +66,7 @@ if ~exist('OCTAVE_VERSION')
|
||||||
addpath([dynareroot '/missing/rows_columns'])
|
addpath([dynareroot '/missing/rows_columns'])
|
||||||
% Replacement for vec() (inexistent under MATLAB)
|
% Replacement for vec() (inexistent under MATLAB)
|
||||||
addpath([dynareroot '/missing/vec'])
|
addpath([dynareroot '/missing/vec'])
|
||||||
if isempty(ver('stats'))
|
if ~license('test', 'statistics_toolbox')
|
||||||
% Replacements for functions of the stats toolbox
|
% Replacements for functions of the stats toolbox
|
||||||
addpath([dynareroot '/missing/stats/'])
|
addpath([dynareroot '/missing/stats/'])
|
||||||
end
|
end
|
||||||
|
|
|
@ -38,7 +38,7 @@ global options_
|
||||||
options_ = set_default_option(options_,'solve_algo',2);
|
options_ = set_default_option(options_,'solve_algo',2);
|
||||||
info = 0;
|
info = 0;
|
||||||
if options_.solve_algo == 0
|
if options_.solve_algo == 0
|
||||||
if ~exist('OCTAVE_VERSION') && isempty(ver('optim'))
|
if ~exist('OCTAVE_VERSION') && ~license('test', 'optimization_toolbox')
|
||||||
error('You can''t use solve_algo=0 since you don''t have MATLAB''s Optimization Toolbox')
|
error('You can''t use solve_algo=0 since you don''t have MATLAB''s Optimization Toolbox')
|
||||||
end
|
end
|
||||||
options=optimset('fsolve');
|
options=optimset('fsolve');
|
||||||
|
|
|
@ -225,7 +225,7 @@ for it_=start:incr:finish
|
||||||
if (verbose == 1)
|
if (verbose == 1)
|
||||||
disp('steady: fsolve');
|
disp('steady: fsolve');
|
||||||
end
|
end
|
||||||
if exist('OCTAVE_VERSION') || isempty(ver('optim'))
|
if exist('OCTAVE_VERSION') || ~license('test', 'optimization_toolbox')
|
||||||
% Note that fsolve() exists under Octave, but has a different syntax
|
% Note that fsolve() exists under Octave, but has a different syntax
|
||||||
% So we fail for the moment under Octave, until we add the corresponding code
|
% So we fail for the moment under Octave, until we add the corresponding code
|
||||||
error('DYNARE_SOLVE: you can''t use solve_algo=0 since you don''t have Matlab''s Optimization Toolbox')
|
error('DYNARE_SOLVE: you can''t use solve_algo=0 since you don''t have Matlab''s Optimization Toolbox')
|
||||||
|
|
Loading…
Reference in New Issue