mexext
二进制 MEX 文件扩展名
说明
示例
显示您的计算机的文件扩展名
查找适用于 Mac 平台的 MEX 文件扩展名
获取受支持平台的文件扩展名列表。
extlist = mexext('all');
mex
命令使用平台的 arch
值来标识平台,该值是 computer('arch')
命令的输出。对于 Mac 平台,该值为 maci64
。
在 extlist
的 arch
字段中搜索 'maci64'
,并显示相应的 ext
字段。
for k=1:length(extlist) if strcmp(extlist(k).arch, 'maci64') disp(sprintf('Arch: %s File Extension: %s', extlist(k).arch, extlist(k).ext)) end end
Arch: maci64 File Extension: mexmaci64
输出参量
ext
— 文件扩展名
mexa64
| mexmaci64
| mexw64
MEX 文件的文件扩展名,返回为以下值之一。
MEX 文件与平台相关的扩展名
平台 | 二进制 MEX 文件扩展名 |
---|---|
Windows® |
|
Linux® |
|
采用 Apple 芯片的 macOS |
|
采用 Intel® 的 macOS |
|
注意
使用 Rosetta 2 的 Apple 芯片平台不支持使用 Intel 在 macOS 上编译的 MEX 文件。
extlist
— 所有文件扩展名
结构体
所有文件扩展名,以包含以下字段的结构体形式返回:
arch
— 平台
字符向量
平台,以字符向量形式返回。平台名称是 computer('arch')
命令的输出。
ext
— 文件扩展名
字符向量
文件扩展名,以字符向量形式返回。
提示
要在 MATLAB® 之外的联编文件或脚本中使用 MEX 文件扩展名,请从系统命令提示符处键入以下命令之一。脚本位于
文件夹中。matlabroot
\binmexext.bat
- Windows 平台。mexext.sh
- UNIX® 平台。例如,以下命令位于 GNU® 联编文件中。
ext = $(shell mexext) yprime.$(ext) : yprime.c mex yprime.c
扩展功能
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
版本历史记录
在 R2006a 之前推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)