MATLAB 帮助中心
将日历持续时间的时间转换为持续时间
t = time(d)
t = time(d) 以持续时间的形式返回 d 中的日历持续时间值的时间分量。t 输出的大小与 d 相同。
d
t
示例
全部折叠
创建一个日历持续时间数组。
d = caldays(8:10) + hours(1.2345)
d = 1×3 calendarDuration 8d 1h 14m 4.2s 9d 1h 14m 4.2s 10d 1h 14m 4.2s
将该数组的时间分量转换为持续时间。
t = 1×3 duration 01:14:04 01:14:04 01:14:04
查看 t 的数据类型。
whos t
Name Size Bytes Class Attributes t 1x3 40 duration
输入日历持续时间,指定为标量、向量、矩阵或多维 calendarDuration 数组。
calendarDuration
全部展开
time 函数完全支持 tall 数组。有关详细信息,请参阅 tall 数组。
time
backgroundPool
ThreadPool
此函数完全支持分布式数组。有关详细信息,请参阅使用分布式数组运行 MATLAB 函数 (Parallel Computing Toolbox)。
在 R2014b 中推出
calyears | calquarters | calmonths | calweeks | caldays | duration
calyears
calquarters
calmonths
calweeks
caldays
duration
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处