I receive the following error when adding a MATLAB file (level-2) S-Function to a SIMULINK model using the function ADD_BLOCK:
??? Error using ==> add_block There is no block named 'simulink/User-Defined Functions/MATLAB file (level-2) S-Function'.
To reproduce this error, you can use the following code:
new_system('mySystem')open_system('mySystem')add_block('simulink/User-Defined Functions/MATLAB file (level-2) S-Function', 'mySystem/mySFunction')
Best Answer