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: simple mex file issue
Replies: 4   Last Post: Jul 22, 2011 3:46 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jan Simon

Posts: 2,923
Registered: 10/6/08
Re: simple mex file issue
Posted: Jul 22, 2011 3:46 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear Mateusz Gos,

> 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.

Kind regards, Jan



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.