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

조회 수: 84 (최근 30일)
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.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 12월 20일
편집: MathWorks Support Team 2023년 12월 20일
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개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by