function p = mytoolboxdir
%TOOLBOXDIR directory where toolboxes are stored
%  P = TOOLBOXDIR returns the directory where the misc toolbox is stored

% Copright (c) Peter Fiala

% get path of current m file (toolboxdir/misc)
p = fileparts(mfilename('fullpath'));
% go one directory higher
p = p(1:find(p==filesep(), 1, 'last')-1);

end % of function
