Main Content

extractTime (J1939)

Occurrences of J1939 parameter groups within time range



extractedPGs = extractTime(pgrp,starttime,endtime) returns the parameter groups found in the array pgrp, with timestamps between the specified starttime and endtime, inclusive.


collapse all

Extract the parameter groups according to start and stop timestamps.

Extract parameter groups between 5 and 10.5 seconds.

extractedPGs = extractTime(pgrp,5,10.5)

Extract all parameter groups within the first minute.

extractedPGs = extractTime(pgrp,0,60)

Extract all parameter groups after 150 seconds.

extractedPGs = extractTime(pgrp,150,Inf)

Input Arguments

collapse all

J1939 parameter groups, specified as an array of ParameterGroup objects. Use thej1939ParameterGroup or receive function to create ParameterGroup objects.

Start time and end time, specified as numeric values. These arguments define the range of time from which to extract parameter groups, inclusively. For the earliest possible starttime use 0, for the latest possible endtime use Inf. The endtime value must be greater than the starttime value.

Data Types: double | single

Output Arguments

collapse all

Extracted parameter groups, returned as an array of ParameterGroup objects. These parameter groups fall within the specified time range, inclusively.

Introduced in R2015b