In the following thread a similiar problem is described:
I tried to implement the 2-Level Matlab by saving it to an m.file and calling it in an S-Function
I got the following error:
Error evaluating registered method 'PostPropagationSetup' of MATLAB S-Function 'msfcn_varsize_delay' in 'recycle_FTS/Level-2 MATLAB S-Function'. The following is the MATLAB call stack (file names and line numbers) that produced this error:
['C:\Users\ulric\Desktop\MA\Simulink\FTS\msfcn_varsize_delay.m'] [67]
Caused by:
Invalid dimensions specified for Dwork 1 of 'recycle_FTS/Level-2 MATLAB S-Function'. Dwork must be a vector, and its width must be a positive integer
It´s the first time I ever use such a function and I´m quite lost to be honest.
I am grateful for any help and will supply you with any information that might be lacking.
Kind regards
Uli