How do I check which toolboxes are used in my MATLAB files in MATLAB?
89 views (last 30 days)
Show older comments
MathWorks Support Team
on 23 Feb 2017
Edited: MathWorks Support Team
on 20 Dec 2023
I have a MATLAB file that I wish to distribute to other users. I would like to inform users which toolboxes are needed to run my MATLAB file.
Accepted Answer
MathWorks Support Team
on 20 Dec 2023
Edited: MathWorks Support Team
on 20 Dec 2023
You can check the licenses that have been checked out by using the LICENSE function. You can do so by following these steps:
1. Start MATLAB.
2. Run the MATLAB file in which you wish to determine the toolboxes used.
3. Enter the following command in the MATLAB prompt:
>> license('inuse')
Also, you can use "matlab.codetools.requiredFilesAndProducts" function. It lists the dependencies of the MATLAB program files, including required files and toolboxes.
To run the above function, use the command:
[fList, pList] = matlab.codetools.requiredFilesAndProducts('dependency_check.m')
You can then the list the required products using:
{pList.Name}
For more details, please refer to this MATLAB Documentation page.
・Identify Program Dependencies
Note
: MATLAB Compiler and Compiler SDK are excluded from analysis by matlab.codetools.requiredFilesAndProducts. If your code uses functions from these two toolboxes, it won't show in the result.
0 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!