The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

Advanced Search

Back to Topic List Back to Topic List  

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


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,, I have to get the path to the file by using

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

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?


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.