MATLAB using .m file in preference to .mexw64

4 visualizaciones (últimos 30 días)
S Crombie
S Crombie el 30 de Nov. de 2017
Comentada: S Crombie el 30 de Nov. de 2017
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?

Respuesta aceptada

James Tursa
James Tursa el 30 de Nov. de 2017
Editada: James Tursa el 30 de Nov. de 2017
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 comentario
S Crombie
S Crombie el 30 de Nov. de 2017
Thank you very much. I hadn't realised the importance of the order of folders in the path.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by