How to determine what add-ons are needed to execute?

Given that I have one or more .m files that I need to execute, how do I determine what add-ons are needed? I run into this problem each year when my boss asks me what add-ons we need to purchase this year.
I usually end up doing a combination of 1) and 2) 1) Try to execute the code anyway and wait for the error message telling me that I don't have an add-on. Go install the missing add-on, rinse and repeat until the code eventually executes. 2) Go through the code line by line and search every function that appears in the code, noting the add-on that the function belongs to.
Is there an easier way of figuring this out? I just need to know what components are needed to properly use a code.

 Accepted Answer

In the "Current Folders" panel, look for the little down arrow on the title bar, to the right of where it says "Current Folder". Click on it and select "Reports -> Dependency Report" It will tell you what files you need. Or try these links:

1 Comment

The Dependency Report did pretty much what I needed. It doesn't explicitly give the name of the add-on but gives the path to the toolbox. A simple cross check with the list of MATLAB add-ons did the rest. Thanks.

Sign in to comment.

More Answers (1)

depfun() can help, provided that the functions are being used in direct calls rather than eval'd out of strings (GUIDE uses that approach.)
R2014a has new functionality to replace depfun I think I saw in the release notes.

Categories

Find more on Files and Folders in Help Center and File Exchange

Asked:

on 16 Mar 2014

Commented:

on 16 Mar 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!