Filter löschen
Filter löschen

how to open mex file in MATLAB

106 Ansichten (letzte 30 Tage)
Roy Francis
Roy Francis am 5 Mai 2013
Kommentiert: MikCh am 5 Mai 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

Akzeptierte Antwort

Jan
Jan am 5 Mai 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 Kommentare
Rik
Rik am 19 Jun. 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 am 20 Jun. 2019
Yes I pressed
mexext.sh
But it didn't help me either.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

MikCh
MikCh am 4 Mai 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 Kommentare
Steven Lord
Steven Lord am 4 Mai 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 am 5 Mai 2023
Thank you @Steven Lord, I appreciate your detailed reply!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by