Personnally, I try to always access the files which are encapsulated into my applications without the path.
My advice:
- Use MATLAB/Simulink Projekt to create your workspace with all files you need in the path
- Replace all your relative path in your code with direct access to file (e.g. load data.mat)
- Compile your app
- To check what looks like your workspace once you start the compiled app, check the content of this folder:
C:\Users\<<your_username>>\AppData\Local\Temp\<<your_username>>\mcrCacheX.X\...
In this folder, you will find the exact workspace used by your app. You can then easily check that all files are included and what they have for path.