Compiled executables start executing with a current directory being the location the executable was unpacked .
Likely when you are constructing the file names you are not fully qualifying them by using fullfile()
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!