milliseconds
以毫秒为单位的持续时间
说明
示例
创建毫秒持续时间数组
X = magic(3); MS = milliseconds(X)
MS = 3x3 duration
0.008 sec 0.001 sec 0.006 sec
0.003 sec 0.005 sec 0.007 sec
0.004 sec 0.009 sec 0.002 sec
将持续时间转换为由毫秒构成的数值数组
创建一个 duration
数组。
X = minutes(2) + seconds(1:3)
X = 1x3 duration
2.0167 min 2.0333 min 2.05 min
将 X
中的每个持续时间转换为一个毫秒数。
MS = milliseconds(X)
MS = 1×3
121000 122000 123000
MS
是一个 double
数组。
输入参数
X
— 输入数组
数值数组 | 持续时间数组 | 逻辑数组
输入数组,指定为数值数组、持续时间数组或逻辑数组。
扩展功能
tall 数组
对行数太多而无法放入内存的数组进行计算。
此函数完全支持 tall 数组。有关详细信息,请参阅 tall 数组。
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
此函数完全支持代码生成。有关详细信息,请参阅持续时间数组的代码生成 (MATLAB Coder)。
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
分布式数组
使用 Parallel Computing Toolbox™ 在集群的组合内存中对大型数组进行分区。
此函数完全支持分布式数组。有关详细信息,请参阅Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox)。
版本历史记录
在 R2015a 中推出
另请参阅
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)