This video shows the steps to get the required files and products (toolboxes) to run any command or file in MATLAB R2023a. This will be helpful to know which all product license is required to run any code, Simulink model or command in MATLAB environment. The below command works for any kind of files – .slx, .m, .mex, and others.
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('FileName')
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Complete source code and other details:
Main Command:
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('ocr_number.m')
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('ocr.m')
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('sf_aerodyn.m')
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('sf_sfun.mexw64')
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('vdp.slx')
Commands with respective outputs:
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('ocr_number.m')
file_list =
1×2 cell array
{'C:\Work\matlab\RequiredFilesAndProducts_…'} {'C:\Work\matlab\RequiredFilesAndProducts_…'}
product_list =
1×2 struct array with fields:
Name
Version
ProductNumber
Certain
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('ocr.m')
file_list =
0×0 empty cell array
product_list =
1×2 struct array with fields:
Name
Version
ProductNumber
Certain
>> product_list(2).Name
ans =
'Computer Vision Toolbox'
>> matlab.codetools.requiredFilesAndProducts('sf_aerodyn.m')
ans =
0×0 empty cell array
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('sf_aerodyn.m')
file_list =
0×0 empty cell array
product_list =
1×2 struct array with fields:
Name
Version
ProductNumber
Certain
>> which sf_sfun
C:\Tools\MATLAB\R2023a\toolbox\stateflow\stateflow\sf_sfun.mexw64
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('sf_sfun.mexw64')
file_list =
0×0 empty cell array
product_list =
1×3 struct array with fields:
Name
Version
ProductNumber
Certain
>> [file_list, product_list] = matlab.codetools.requiredFilesAndProducts('vdp.slx')
file_list =
0×0 empty cell array
product_list =
1×2 struct array with fields:
Name
Version
ProductNumber
Certain
>> product_list(2).Name
ans =
'Simulink'
>>
Screenshots:
>> which -all matlab.codetools.requiredFilesAndProducts
C:\Tools\MATLAB\R2023a\toolbox\matlab\codetools\+matlab\+codetools\requiredFilesAndProducts.m % static method or package function
Excerpt:
The video provides a guide on how to find the required files and products needed to run commands or files in MATLAB R2023a. The tutorial helps identify which product licenses are needed for different codes, Simulink models, or commands. The command [file_list, product_list] = matlab.codetools.requiredFilesAndProducts(‘FileName’) is used for different file types, including .slx, .m, .mex and others. Screenshots and demo commands with their outputs are shared to illustrate how to use the command in different scenarios. Questions and suggestions can be forwarded to the provided contact information.