I have created a custom Type "MyTypeDef".
I have a Simulink model with a MATLAB function block which contains the following line:
coder.ceval('TestFunc',cast(u,'like',dt));
Where u is an input variable named "TestDefine" and dt is of type "MyTypeDef".
I am trying to cast TestDefine of type double to MyTypeDef.
The generated code is
TestFunc(TestDefine);
However I am expecting to see:
TestFunc((MyTypeDef)TestDefine);
Is the above code expected behavior? Is there an option to set to generate the code in the way I am expecting?
Best Answer