Main Content

extractTime

Select CAN messages occurring within specified time range

Description

extracted = extractTime(message,starttime,endtime) parses the array message and returns all messages with a timestamp value within the specified starttime and endtime, inclusive.

example

Examples

collapse all

Extract messages in first 10 seconds of channel being on.

msgRange = extractTime(msgs,0,10);

Input Arguments

collapse all

CAN messages to parse, specified as an array of CAN message objects. This is the collection from which you extract recent messages.

Time range in seconds, specified as numeric values. The function returns messages with timestamps that fall within the range defined by starttime and endtime, inclusive.

Specify the time range in increasing order from starttime to endtime. If you must specify the largest available time, set endtime to Inf. The earliest time you can specify for starttime is 0.

Example: 0,10

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Extracted CAN messages, returned as an array of CAN message objects. These are the messages within the specified time range.

Version History

Introduced in R2009a

See Also

Functions