Brett's Pick this week is "FDEP: a pedestrian function dependencies finder," by Us.
Today's Pick facilitates the same functionality, plus more. FDEP "dissects [MATLAB] files and iteratively looks for all user-defined functions used during runtime." With a simple syntax:
fd = fdep('MorphTool.m')
you get a structure that shows a wealth of useful information. If you really want to dig in and detect all file dependencies for you MATLAB function, function DEPFUN does a pretty good job--but can be very slow. Us's file is a wrapper around DEPFUN, but "due to an efficient pruning engine," it can be much faster.
Output from depfun is a structure that includes information about Toolbox dependencies, function calls, help, subfunctions, and more. To create a complete zip file, for example, one could say simply:
Us's code is, as usual, difficult (for me, at least) to read, but superbly implemented and robust--I've learned to trust it over the years.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.