how find Specified two module names by find_system API
3 次查看(过去 30 天)
显示 更早的评论
hello all,
I want to find the Subsystem in the Specified Path. but the Subsystem's Name is Runnable or Subsystem's Name is Function.
I only can find a Name, I don't find two Name.
lockPath=find_system([MODEL_NAME,'/',MODEL_NAME,'/Subsystem/',MODEL_NAME],'regexp','on','blocktype','SubSystem','Name',{'Runnable','Function'});
Can you find two Name ?
0 个评论
回答(1 个)
Sameer
2024-8-22
Hi
From my understanding, you want to search for subsystems within a specific path in your Simulink model that have the names "Runnable" or "Function".
To achieve this, you can modify “find_system” function to include a regular expression that matches both the names.
Here's how you can do it:
lockPath = find_system([MODEL_NAME, '/', MODEL_NAME, '/Subsystem/', MODEL_NAME], ...
'regexp', 'on', ...
'blocktype', 'SubSystem', ...
'Name', '^(Runnable|Function)$');
Please refer to the below MathWorks documentation link:
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!