Personnally, I try to always access the files which are encapsulated into my applications without the path.
- 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:
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.