Find_system is not searching under Lookinside subsytem reference in v2021a

조회 수: 9 (최근 30일)
Raju Kata
Raju Kata 2021년 12월 2일
답변: Satwik 2024년 4월 5일
I have been tried with the below command
1)all_lookup_path = find_system(gcs,'LookInsideSubsystemReference','on','FollowLinks','on','SearchDepth','2','LookUnderMasks', 'all','LookUnderReadProtectedSubsystems','on', 'BlockType','Lookup_n-D');
2) all_lookup_path = find_system(gcs,'LookInsideSubsystemReference','on','FollowLinks','on','LookUnderMasks', 'all','LookUnderReadProtectedSubsystems','on', 'BlockType','Lookup_n-D');
In my model, the navigation to blocks are : Modelreference>subsystem>Librarylinks>masked subsytem
My goal is to collect the different block paths under subsystem refernce.
Kindly suggest me the suitable command line argument for that
Thanks in advance.
  댓글 수: 1
Sanman
Sanman 2022년 1월 27일
Hi Raju,
I'd like to understand the model hierarchy a bit more. As you mentioned the heirarchy seems to be Modelreference>subsystem>Librarylinks>masked subsytem.
Now, is the subsystem reference block one of the two subsystems you mentioned, or does in lie beneath the mask subsystem?

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

답변 (1개)

Satwik
Satwik 2024년 4월 5일
Hello Raju,
I assume that the hierarchy of the model used is Subsystem Reference > Subsystem > LibraryLinks > Masked Subsystem and you are trying to get all the block paths under 'Subsystem Reference'. You may use the command-line code given below -
% Load the Simulink model into memory.
load_system('modelName');
% This function returns a cell array of block paths that match the criteria.
all_lookup_path = find_system('modelName/Subsystem Reference');
% 'all_lookup_path' now contains the paths to all the blocks that match the
% criteria.
For more details on the 'find_system' function in Simulink, you can refer to this documentation: https://www.mathworks.com/help/releases/R2021a/simulink/slref/find_system.html.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by