I'm stuck with this issue. I have a typical example where I don't know what data type to use for the preintialisation. I'm using a simple matlab function in simulink model which sends handles of "tcpclient" system object to other matlab function. The script of this function is as follows.
y = tcpclient("192.168.0.141",1436);
As you can imagine, at the time of compilation Simulink would throw me the following error
Function output 'y' cannot be an mxArray in this context. Consider preinitializing the output variable with a known type.
How would one intialize this type of system objects?