How can I determine which functions in a MATLAB file originate from a specific toolbox?

69 visualizzazioni (ultimi 30 giorni)
How can I determine which function originated the use of a MATLAB toolbox in my code files? 
For example, I produce the following code in a script titled "Test.m":
dp = 300; wavelen = 3;
sp = dop2speed(dp,wavelen);
Then I execute the following:
>> [fList, pList] = matlab.codetools.requiredFilesAndProducts('Test.m')
>> plist(1,2).Name
ans = 
'Phased Array System Toolbox'
Calling "matlab.codetools.requiredFilesAndProducts" reports the toolboxes that are used but not the functions belonging to the toolboxes. How can I find out which function in my code is from 'Phased Array System Toolbox'?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 5 Giu 2023
Modificato: MathWorks Support Team il 5 Giu 2023
In order to determine the function that originates the use of a toolbox, you should generate a Dependency Report. This report identifies the toolboxes being used and the MATLAB functions files belonging to the toolboxes.
When a dependency report is generated on the script it will produce the following line:
Test | toolbox : \phased\phased\dop2speed.m
This indicates that the "dop2speed.m" function used in the MATLAB file "Test.m" originated from the Phased Array System Toolbox.
To learn more regarding Dependency Reports, please see "Dependencies Within a Folder" section at the following link:

Più risposte (0)

Categorie

Scopri di più su Downloads in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by