MATLAB: How to inherit the data type of the inputs in a C Mex Sfunction

cmex sfunctiondata typessfunctionunspecified data type for sfunction

Hello everyone,
I was wondering if it's possible to write a s-function in C without specifying the data type of the input variables. I need it because I have to write a block which is able to process any types of data
thanks 4 reading
cheers

Best Answer

Hi Grapevine,
yes, that's right. You will need to register the mdlSetOutputPortDataType function, see matlabroot\simulink\src\sfuntmpl_doc.c
Titus