In order to distribute a function I\'ve written that depends on other functions I\'ve written that have their own dependencies and so on without distributing every m-file I
For MATLAB 2015a and later you should preferably look at matlab.codetools.requiredFilesAndProducts
MATLAB 2015a
or doc matlab.codetools.requiredFilesAndProducts
doc matlab.codetools.requiredFilesAndProducts
because depfun is marked to be removed in a future release.
depfun