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

62 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 20 Dic 2023
Modificato: MathWorks Support Team il 20 Dic 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. 

Più risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by