Files
sioe 397cfa61dd Auswertung Experiment
Database tüddelei
DBHanlder läuft gut für DIESE Datanbank struktur...
App begonnen aber weit entfernt von gutem Stand
2024-11-15 16:51:37 +01:00

31 lines
937 B
Matlab

function rootpath = m2troot(varargin)
% M2TROOT produces paths inside the matlab2tikz repository
%
% Usage:
% There are two ways to call this function, the base syntax is:
%
% * rootpath = m2troot()
%
% where |rootpath| points towards the root of the repository.
%
% The other syntax:
%
% * path = m2troot(...)
%
% is equivalent to |fullfile(m2troot, ...)| and as such allows to
% easily produce a path to any file within the repository.
m2t = which('matlab2tikz');
if isempty(m2t)
error('M2TRoot:NotFound', 'Matlab2tikz was not found on the PATH!')
end
[srcpath] = fileparts(m2t); % this should be $(m2troot)/src
[rootpath, srcdir] = fileparts(srcpath); % this should be $(m2troot)
assert(strcmpi(srcdir,'src'));
if nargin >= 1
rootpath = fullfile(rootpath, varargin{:});
end
end