restoredefaultpath

% -------------------------------------------------------------------------
% MANUAL OVERRIDE
% If Dynare 6.5 is not installed in the default location, set dynare_path
% to the full path of its matlab subdirectory (e.g. '/my/path/dynare/6.5/matlab').
% Leave empty ('') to use automatic platform detection.
dynare_path = '';
% -------------------------------------------------------------------------

if isempty(dynare_path)
    if ismac
        if exist('/Applications/Dynare/6.5-arm64/matlab', 'dir')
            dynare_path = '/Applications/Dynare/6.5-arm64/matlab';
        elseif exist('/Applications/Dynare/6.5/matlab', 'dir')
            dynare_path = '/Applications/Dynare/6.5/matlab';
        end
    elseif ispc
        dynare_path = 'C:\dynare\6.5\matlab';
    else
        dynare_path = '/usr/lib/dynare/matlab';
    end
end

if isempty(dynare_path) || ~exist(dynare_path, 'dir')
    error('Dynare 6.5 was not found in the expected default location.\nPlease install Dynare 6.5 or set the dynare_path variable to your installation directory at the top of this script .');
end

dir1 = dynare_path;
dir2 = '../../utilities';
dir3 = '../../toolbox_programs';

path(dir1, path);
path(dir2, path);
path(dir3, path);


