I have developped a simulink model. I compiled it to have a level-2 sfunction : 'sfun.mexw32'. I would like to call this sfunction in a .m file in the Matlab editor.
I struggle with how to implement it, so I am first trying to understand how to do that with an illustration sfunction already existing in matlab : timestwo.
You can get more information by typing open('sfuntmpl.m')
which is the template for sfunction.
[sys,x0,str,ts] =timestwo(0,0,1,3)
I got this error : "Error using timestwo MEX level2 S-function "timestwo" called with too many left hand arguments"
I do not understand why I have this error, and I expected to have the result of the input 1
which should be 2
.
And also know if it is possible to give a vector of input and an input representing time to simulate a signal and get the result.