MATLAB: Am I seeing an error when I shadow a MATLAB builtin function MATLAB R2006b

MATLAB Compiler

I have my own version of a MATLAB builtin function, for example: ISSCALAR on the MATLAB Path. When I execute MCC:
mcc -m -v magicsquare.m
I receive the following error immediately, possibly as the only output of MCC:
Warning: Function d:\work\isscalar.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.

Best Answer

Shadowing MATLAB MATLAB functions with your own versions can cause problems with other MATLAB files that depend on those functions. When you enter the directory with these problematic functions, MATLAB shows a warning message indicating this:
Warning: Function d:\work\isscalar.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
There are two options available to work around this:
1. Avoid using the same names as MATLAB functions, or list your directory after the MATLAB one on your MATLAB path.
2. However, if your code works as expected in MATLAB, you can use MCC -N, along with the -I and -p flags, to modify the search path used by the Compiler. You can find more information here:
doc mcc
Related Question