필터 지우기
필터 지우기

how to open mex file in MATLAB

조회 수: 91 (최근 30일)
Roy Francis
Roy Francis 2013년 5월 5일
댓글: MikCh 2023년 5월 5일
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

채택된 답변

Jan
Jan 2013년 5월 5일
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
Rik
Rik 2019년 6월 19일
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 2019년 6월 20일
Yes I pressed
mexext.sh
But it didn't help me either.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by