Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Read the included .txt file from a compiled .EXE file
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
GS

Posts: 22
Registered: 4/19/12
Read the included .txt file from a compiled .EXE file
Posted: Sep 6, 2013 7:26 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

Problem:
1. I am compiling a matlab file using mcc, however I have issues reading a .txt file that I want to go with it (a configuration file).

According to this, http://www.mathworks.com/support/solutions/en/data/1-1MHFE8/, I have to get the path to the file by using

fullfile(ctfroot, mfilename, 'mydata.txt')

Problem:
a) This technique is valid if the .m file and the .EXE file have the same name. If someone changes the filename of the .EXE file that I distribute, then this won't work.

Is there a workaround? How do I get the name of the executable, on a deployed .EXE?

Thanks.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.