MATLAB: How to find level-2 s-functions in model

find_systems-functionssimulink

Hey everybody,
I'd like to search a simulink model for Level-2 s-functions. So, when creating a script to do that and therefore entering the following lines (modelname = 'test'): open 'test' find_system('test','BlockType','S-Function')
I am able to find all Level-1 s-functions. Anyway, that approach doesn't work when searching for level-2 files. Do you have any workaround to achieve that aim?
Thanks for your advice.
Kev

Best Answer

Try:
find_system('test','BlockType','M-S-Function')