How do I check which toolboxes are used in my MATLAB files in MATLAB?

91 vues (au cours des 30 derniers jours)
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.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 20 Déc 2023
Modifié(e) : MathWorks Support Team le 20 Déc 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. 

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by