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
0 个评论
回答(1 个)
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
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!