To use the MEX function, the compiled MEX function must be present on the MATLAB search path. This can be achieved in either of two ways:
1. Add the directory where the compiled MEX function is located to the MATLAB search path (see the MATLAB addpath function)
or
2. Copy the files to a location already on the MATLAB search path.
As with all uses of the C model, the correct C model libraries also need to be present on the platform library search path (that is, PATH or LD_LIBRARY_PATH).