pej*_*eje 7 64-bit matlab 32-bit
如何确定我是在32位还是64位版本的matlab上运行?
我有一些预编译的mex文件需要不同的路径,具体取决于32/64bit matlab.
32对64位的问题实际上是一个红色的鲱鱼.如果我理解正确,您需要确定需要哪组已编译的MEX文件,以便您可以适当地设置路径.为此,您可以使用以下功能mexext:
>> help mexext
MEXEXT MEX filename extension for this platform, or all platforms.
EXT = MEXEXT returns the MEX-file name extension for the current
platform.
ALLEXT = MEXEXT('all') returns a struct with fields 'arch' and 'ext'
describing MEX-file name extensions for all platforms.
There is a script named mexext.bat on Windows and mexext.sh on UNIX
that is intended to be used outside MATLAB in makefiles or scripts. Use
that script instead of explicitly specifying the MEX-file extension in
a makefile or script. The script is located in $MATLAB\bin.
See also MEX, MEXDEBUG.
Run Code Online (Sandbox Code Playgroud)
接受ScottieT812和dwj建议,我发布自己的解决方案以获得一些积分.
该函数computer返回我正在运行的体系结构.所以:
switch computer
case 'GLNX86'
display('32-bit stuff')
case 'GLNXA64'
display('64-bit stuff')
otherwise
display('Not supported')
end
Run Code Online (Sandbox Code Playgroud)
适合我