How do I tell which toolboxes my program uses?
548 views (last 30 days)
Does anyone know of a quick way to test which toolboxes are used in a set of code. I have a large project (spread accross different functions), and I can't remember what toolboxes I had available when I wrote it.
I only have the basic install of MATLAB at my new company and need to figure out which toolboxes to buy. I can identify one because the code crashes when it hits a particular function, but can't easiy find out if there are others.
Perhaps there is a script out there to search the text and compare it against a list of functions in the different toolboxes?
Andreas Goser on 28 Jan 2011
There are a couple of things to try and consider. First, you can run code on a machine that has the necessary products (e.g. a trial version) and after running the code execute:
and it will return what products you have used. With the exception of the point Walter mentione in his comment (in case the code uses EVAL), this is a save method.
Then there is the DEPFUN command that lists dependencies. I have seen users work with that, but you need to have a good understanding of the function names and to which product they belong. You may need to do research and it is error-prone.
More Answers (3)
Subin Kuttappan Stellal Mary on 18 Oct 2016
matlab.codetools.requiredFilesAndProducts will list all the toolboxes used in the m script.
Check this documentation link : http://in.mathworks.com/help/matlab/ref/matlab.codetools.requiredfilesandproducts.html
Andrew Newell on 28 Jan 2011
You could do a dependency report for each folder that your code is in (from the menu in the Current Folder window). The toolboxes will be apparent from the locations of the functions.