find_system with MatchFilter function is not working

7 次查看(过去 30 天)
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