find_system with MatchFilter function is not working

조회 수: 10 (최근 30일)
Aron Csato
Aron Csato 2022년 3월 11일
답변: Vidip 2023년 12월 20일
Hi! I tried to use find_system method with MatchFilter function in MatLab 2019b like in the example in help
load_system('vdp');
blks = find_system('vdp', 'MatchFilter', @nonInOutBlocks)
but after the run blks is empty

답변 (1개)

Vidip
Vidip 2023년 12월 20일
I understand that the ‘find_system’ function with the ‘MatchFilter’ option allows you to filter blocks based on a custom function. In your example, you are using the ‘nonInOutBlocks’ function as a filter. However, if 'blks' is empty, it suggests that there might be no blocks in the system that match the criteria.
Try a simpler ‘MatchFilter’ function, if it works, then the issue might be specific to the ‘nonInOutBlocks’ function definition.
You might want to check the block types in your system and adjust the filtering criteria accordingly. You can use the ‘get_param’ function to inspect the properties of a block and modify the ‘nonInOutBlocks’ function accordingly.
For further information, refer to the documentation link below: https://in.mathworks.com/help/slrealtime/api/slrealtime.target.getparam.html

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by