MATLAB using .m file in preference to .mexw64

4 ビュー (過去 30 日間)
S Crombie
S Crombie 2017 年 11 月 30 日
コメント済み: S Crombie 2017 年 11 月 30 日
I am using a toolbox which has required me to compile certain functions from c code. This has generated a .mexw64 file but unless I am working in the folder where this file is located MATLAB runs the .m file of the same name. (The .m file merely outputs a comment that this function needs to be compiled from the .c file.)
Is there something I should set in the path so that MATLAB will use the .mexw64 file even when I am working in a different folder?

採用された回答

James Tursa
James Tursa 2017 年 11 月 30 日
編集済み: James Tursa 2017 年 11 月 30 日
Either:
- Put the .mexw64 file in the same directory as the associated .m file
Or:
- Make sure the directory where the .mexw64 file is located is in the path list prior to the directory where the .m file is located.
The first method above is probably the preferred method so that a user can easily associate that those two files are related. Text at the top of the .m file can then be used as help for the .mexw64 file.
  1 件のコメント
S Crombie
S Crombie 2017 年 11 月 30 日
Thank you very much. I hadn't realised the importance of the order of folders in the path.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by