My simulink model contains a SFunction written in Matlab.
If I try to compile the model in Rapid Acceleration Mode the following error is provided.
I read that a soluton is to use a Matlab Function block instead of an SFunction because my code is written in Matlab.
My function needs the following parameters that are provided to an SFunction by default: t, x, u, flag
The outputs of my function are [sys, x0, str, ts] even if only sys is the output of the SFunction Block.
How can i create a Matlab function block that receives the same inputs and get out the same output? Just for example, Where is the flag input?
MFile S-functions without a
corresponding TLC file are not supported. You can inline
your S-function (name) by creating a TLC file for it.
You can also remap your S-function to C by creating a
corresponding C Mex source file and a name.tlc file in
the same directory as the MFile S-function which contains
(on the first line):