Question re/ matlab.codetools.requiredFilesAndProducts function.
7 views (last 30 days)
Show older comments
I have a Matlab app folder containing .m and .mlapp files to analyze and modify some automotive control modelsl. I tried using the function 'matlab.codetools.requiredFilesAndProducts'. It produces a long list of toolboxes, several of them seem very strange, e.g., Simbiology, Financial, Polyspace Bug Finder, etc. which don't seem relevant to anything I am trying to do.
When I run the app and check what's being used with license("inuse"), only a few toolboxes show up and none of these strange ones shown above. What am I missing? Is there a way to properly interpret the dependency output of the function that I need to do? Thanks for any guidance.
PV
0 Comments
Answers (2)
Arthur Goldsipe
on 12 Jun 2024
I'd first check the "Certain" field of the pList output to see if these products have been marked as definitely or just possibly required.
When you run the app, you may not execute every line of code. So that may overlook some of the product dependencies. So I generally expect matlab.codetools.requiredFilesAndProducts to provide a more complete answer. However, the dynamic nature of the MATLAB language means that it is sometimes difficult to analyze these dependencies with 100% accuracy. For product dependencies, you can look at the Certain field to see whether this is a definitive or just a potential depdency.
I'm not sure of this, but I am guessing that some of these unexpected (potential) product dependencies arise when your code has a variable or function name that happens to match the name of a function in another product. If you want a definitive answer for why specific products are being flagged as dependencies, I suggest sharing reproduction steps either here or with MathWorks Technical Support.
Hope that helps!
3 Comments
Arthur Goldsipe
on 13 Jun 2024
I'm afraid I can't offer much more guidance myself. I wasn't aware of dependencies.toolboxDependencyAnalysis. The documentation is a little unclear (and I'll report that concern to our doc team), but here's what I can say: This is a function that ships with Simulink, and one of the examples on the reference page show that this function can tell you the product dependencies of a Simulink model. But it looks like it can also analyze dependencies of MATLAB function files. So there does seem to be some overlap of functionality with matlab.codetools.requiredFilesAndProducts. But my guess is that you mostly want to use matlab.codetools.requiredFilesAndProducts to analyze MATLAB code, and dependencies.toolboxDependencyAnalysis to analyze Simulink models.
Hopefully someone else who is more knowledgable will see this question and chime in. But if you want a definitive followup, you may have to contact MathWorks Technical Support.
Chris Dixon
on 3 Oct 2024 at 11:01
What does the ProductNumber field signify? I cannot find any information on it. Is it the number of functions used within that toolbox?
1 Comment
Arthur Goldsipe
on 3 Oct 2024 at 13:57
ProductNumber is a unique number that MathWorks assigns to each product. I'll report to our documentation team that this needs to be documented.
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!