> Addressing your first question - what I meant is that the COMPILED mex file is using additional files to perform calculations for given inputs. Please trust me this is the best way it could be arranged (and it works nicely as long as these files stay in the designated subfolder in which case the hardcoded path is say 'addFiles\').
If it is hard coded, it will not be flexible. If you want to keep it flexible to allow moving the tools to another computer, choosing the parent folder of the Mex is a bad idea, because there is *no* direct method to determine the parent folder of the Mex at runtime. Therefore I'm sure, that storing data files in the same parent folder is not a good way and neither the best.
The only method to determine the parent folder of the Mex is calling Matlab's WHICH command either from outside the Mex or per mexCallMATLAB.