how to open mex file in MATLAB

78 visualizaciones (últimos 30 días)
Roy Francis
Roy Francis el 5 de Mayo de 2013
Comentada: MikCh el 5 de Mayo de 2023
I have a file with .mexglx and .mexw32 extension. I need to run this files in MATLAB R2012a 32-bit. Is there any possible converter available or any other solution to it.
Thanking you in Advance,
Regards

Respuesta aceptada

Jan
Jan el 5 de Mayo de 2013
You cannot convert the compiled Mex files, but you can run them directly as if they were M-files. But the file extension must match your operating system and Matlab version, see http://www.mathworks.com/help/matlab/ref/mexext.html and follow the "Tips".
  3 comentarios
Rik
Rik el 19 de Jun. de 2019
Once you have a file with that extension you should be able to use it as a normal function.
Also Mac is a Unix system.
Stelios Fanourakis
Stelios Fanourakis el 20 de Jun. de 2019
Yes I pressed
mexext.sh
But it didn't help me either.

Iniciar sesión para comentar.

Más respuestas (1)

MikCh
MikCh el 4 de Mayo de 2023
Hi!
I have a similar issue. I need to run some functions that call two files having the extension "name1_mex.mexw64" or "name2_mex.mexw32".
I tried to replace these extensions with ".sh" but I get back an error saying: "Unrecognized function or variable 'name1_mex'."
Is there any solution to that?
Operating system: macOS 13.3.1
Matlab version: R2019b
  2 comentarios
Steven Lord
Steven Lord el 4 de Mayo de 2023
Neither of those MEX-files will run on Mac OS. MEX-files are architecture specific and the extension indicates the architecture for which they were built. The file with extension .mexw64 is for use on 64-bit Windows and the .mexw32 file is for use on 32-bit Windows (and so can't be run on any release past release R2015b, the last release of MATLAB for 32-bit Windows.)
You will need to either ask whoever gave you the MEX-files to give you a file compiled for Mac, which should have the extension maci64 (if you're using an Intel-based Mac) or maca64 (if you're using the Apple Silicon beta), or ask them for the source code and create the MEX-file yourself using the mex command.
MikCh
MikCh el 5 de Mayo de 2023
Thank you @Steven Lord, I appreciate your detailed reply!

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by