Location required for mex files?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using a toolkit downloaded from the File Exchange. It calls for using mex to compile some .c files for speed. There are also .m versions of these same files. If one of these compiled functions is called from a .m file in the same directory as the .mex files, the .mex files are used and the speed is excellent. But if the .m file is located elsewhere instead the uncompiled (i.e. .m version) is used and the speed is bad. All files in question are in the path. Is there something else that can be done so the .mex files will be used?
0 comentarios
Respuestas (3)
Robert Cumming
el 11 de Abr. de 2011
If you can ensure that the mex file is towards the beginning of the path string it will override the m files, see http://www.mathworks.com/help/techdoc/matlab_prog/f7-58170.html
James Tursa
el 12 de Abr. de 2011
My advice would be to put the mex files in the same directory as the same-named m-file. That way the mex file will always be called to execute the function, but the m-file can still be used for help text.
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!