which(mfilename) in compiled matlab code returns empty string
Show older comments
Hi,
I have a script that runs perfectly if it is not compiled. I have to read a couple of config files. To get the directory of the current script, I use e.g.
which(mfilename)
and subsequently manipulate the string to get the location of the config files. This works perfectly well, if the script is not deployed. If it is deployed, I get merely an empty string. Is there any alternative? I currently use the MCR version 7.11. If find this odd. Shouldn't it return the location of the executable? Your input is very much appreciated.
Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!