You can have difficulty if you have a call to a function and that call is hidden inside a string, such as if you were to use
ode45('SomeFunctionName',...
If you have calls like that then you may need to use a %#function pragma to tell MATLAB to include the function.
If your calls to the function are "obvious", then as long as the file with that name is on your MATLAB path, the MATLAB Compiler will be able to find it and will include it when building the .exe
Best Answer