"Simple" way to determine the number of different types of components used in a Simulink model?
2 次查看(过去 30 天)
显示 更早的评论
I am working with a large Simulink model, and need to determine how many instances of model references, EML blocks, state flow blocks, and S-function blocks are contained in the model. Here's where I am at currently:
- I have resolved the model references by using the find_mdlrefs(system) function, and
- I have generated a list of all of the file dependencies using dependencies.fileDependencyAnalysis(system) function, which allows me to parse the list in search of particular extensions such as .cpp for S-functions or .m for EML blocks, but this doesn't give me much help in terms of State Flow blocks (and I'm not sure the idea that all EML blocks have an associated .m is a sound assumption as I explain this).
- I am currently playing with the find_system(system) function as well.
It seems to me I'm going to need to write a recursive script that digs through each model reference using find_system(system), but this will not give me the extensions of each component, and still does not seem to yield any information as to whether a subsystem is a state flow block or not. Does anyone have a solution to this? Any and all ideas are appreciated.
2 个评论
Swarooph
2016-7-11
编辑:Swarooph
2016-7-11
Have you tried to see if the sldiagnostics function is something that might help you? Documentation here.
It can help find number of each type of block, number of each type of Stateflow object, Number of states, outputs, inputs, and sample times of the root model. Names of libraries referenced and instances of the referenced blocks.(among other things)
采纳的回答
Swarooph
2016-7-25
It can help find number of each type of block, number of each type of Stateflow object, Number of states, outputs, inputs, and sample times of the root model. Names of libraries referenced and instances of the referenced blocks.(among other things)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!