find_system with MatchFilter function is not working
10 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Vidip
on 20 Dec 2023
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 Comments
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!