Regarding sldiagnostics function usage and results

조회 수: 1 (최근 30일)
Deep Shah
Deep Shah 2021년 6월 25일
댓글: Deep Shah 2021년 7월 6일
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?

채택된 답변

Monika Jaskolka
Monika Jaskolka 2021년 7월 4일
편집: Monika Jaskolka 2021년 7월 5일
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
Deep Shah
Deep Shah 2021년 7월 6일
Yes, I figured that out later. Thank you for the clarification again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by