"Simple" way to determine the number of different types of components used in a Simulink model?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Matt Gualdoni
el 8 de Jul. de 2016
Respondida: Swarooph
el 25 de Jul. de 2016
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 comentarios
Swarooph
el 11 de Jul. de 2016
Editada: Swarooph
el 11 de Jul. de 2016
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)
Respuesta aceptada
Swarooph
el 25 de Jul. de 2016
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!