Regarding sldiagnostics function usage and results

1 visualización (últimos 30 días)
Deep Shah
Deep Shah el 25 de Jun. de 2021
Comentada: Deep Shah el 6 de Jul. de 2021
I wanted to know the number of blocks by category present in my model. I used the following command to generate a report myReport = sldiagnostics('model_mdl', 'CountBlocks') then in order to know the paths for all the Selector blocks I used the following command find_system(gcs,'LookUnderMasks','on','blocktype','Selector') .The number of paths generated was not equal to the number of blocks showed in my report. So I wanted to know if what I was doing is right or is there another way to get the paths corresponding to the number of the blocks listed by the sldiagnostics function? I have attached the pictures for reference,
The report shows 67 selector blocks are present in the model,
The picture below shows the paths generated for selector block which is just 3x1 cell array.
I wanted to know why is there a difference in the total number of blocks and the number of paths generated for the blocks matching?

Respuesta aceptada

Monika Jaskolka
Monika Jaskolka el 4 de Jul. de 2021
Editada: Monika Jaskolka el 5 de Jul. de 2021
In the description of sldiagnostics it says that it also follows links, so your command should be:
find_system(gcs, 'LookUnderMasks', 'on', 'FollowLinks', 'on', 'blocktype', 'Selector')
  1 comentario
Deep Shah
Deep Shah el 6 de Jul. de 2021
Yes, I figured that out later. Thank you for the clarification again.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by