extractTime
在指定时间范围内出现的 J1939 参数组
说明
返回在数组 extractedPGs
= extractTime(pgrp
,starttime,endtime
)pgrp
中找到的、时间戳介于指定的 starttime
和 endtime
(包含端值)之间的参数组。
示例
提取在指定时间范围内的参数组
根据开始和停止时间戳提取参数组。
提取在 5 到 10.5 秒之间的参数组。
extractedPGs = extractTime(pgrp,5,10.5)
提取在第一分钟内的所有参数组。
extractedPGs = extractTime(pgrp,0,60)
提取 150 秒后的所有参数组。
extractedPGs = extractTime(pgrp,150,Inf)
输入参数
pgrp
— J1939 参数组
ParameterGroup 对象的数组
J1939 参数组,指定为 ParameterGroup 对象的数组。使用 j1939ParameterGroup
或 receive
函数创建 ParameterGroup 对象。
starttime,endtime
— 开始时间和结束时间
数值
开始时间和结束时间,指定为数值。这些参量定义要提取的参量组所在的时间范围(包含两个端值)。要指定尽可能早的 starttime
,请使用 0
,要指定尽可能晚的 endtime
,请使用 Inf
。endtime
值必须大于 starttime
值。
数据类型: double
| single
输出参量
extractedPGs
— 提取的参数组
ParameterGroup 对象的数组
提取的参数组,以 ParameterGroup 对象的数组形式返回。这些参数组出现在指定的时间范围(包含两个端值)内。
版本历史记录
在 R2015b 中推出
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)