MATLAB: Does the stand-alone application revert to a built-in function in the MATLAB Compiler 4.0 (R14)

builtbuilt-incompilecompilerinMATLAB Compilermcroverloadedstandalone

I am trying to build a stand-alone application which calls a function that has the same name as a MATLAB built-in function. For example, I am trying to replace the built-in PAUSE function with a custom function of the same name. Note this allows applications previously written to call my PAUSE as opposed to the built-in PAUSE.
This custom PAUSE is at the top of the MATLAB path. Additionally, I use the -I flag at compile time in order to include the directory in which it is contained. However, while the MATLAB application calls the correct function, the stand-alone application reverts to the built-in function.
Why does this occur? Are there any workarounds available?

Best Answer

Currently, to work around this issue, you must place the custom function in the same directory as the application which calls it. Note this function may need to be copied to more than one location in order for some applications to work correctly.