Question re/ matlab.codetools.requiredFilesAndProducts function.
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Arthur Goldsipe
2024-6-12
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 个评论
Arthur Goldsipe
2024-6-13
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!