1function BuToolsInit (verbose, checkInput, checkPrecision)
3 fname = mfilename(
'fullpath');
4 [pathstr, ~, ~] = fileparts(fname);
6 disp(
'<strong>Butools V2.0</strong>')
8 packages = {
'utils',
'mc',
'moments',
'reptrans',
'trace',
'ph',
'dph',
'map',
'dmap',
'mam',
'queues',
'fitting'};
11 for p=1:length(packages)
12 pkgpath{p+1} = fullfile(pathstr,packages{p});
14 addpath(strjoin(pkgpath,
':'));
16 fprintf(
'Packages loaded: ');
17 for p=1:length(packages)
26 global BuToolsVerbose;
27 global BuToolsCheckInput;
28 global BuToolsCheckPrecision;
30 if exist(
'verbose',
'var')
31 BuToolsVerbose = verbose;
33 BuToolsVerbose = false;
36 if exist('checkInput','var')
37 BuToolsCheckInput = checkInput;
39 BuToolsCheckInput = true;
42 if exist('checkPrecision','var')
43 BuToolsCheckPrecision = checkPrecision;
45 BuToolsCheckPrecision = 1e-12;
48 fprintf('Global variables: BuToolsVerbose = %d, BuToolsCheckInput = %d, BuToolsCheckPrecision = %g\n',BuToolsVerbose,BuToolsCheckInput,BuToolsCheckPrecision);