This bug has been fixed in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
There is a bug in MATLAB Compiler 4.0 (R14) in the way that relative paths are handled during compilation.
To work around this issue, all paths should be specified as full paths. Several MATLAB commands may be of interest in constructing these paths: PWD, which returns the current directory, FILESEP, which returns '/' or '\' depending on the operating system, and the FULLFILE command, which builds a full directory path from individual subdirectories.
For example, the current directory and any subdirectories can be added as full paths with the following command:
Best Answer