When you use EML.EXTRINSIC for a function, you instruct the Embedded MATLAB subset not to compile or generate code for that function, and instead the software dispatches these functions to MATLAB for execution. The key is to make code in the actual Embedded MATLAB block in the model a simple wrapper that calls a secondary .m file, and then to declare that entire secondary .m file to be extrinsic. Thus you avoid the general requirement that the code inside of the EML block needs to support code generation.
An example of this procedure can be seen in 'triscatteredinterp_simulink_good.mdl' attached to this solution.
Best Answer