Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

extractTime

Select CAN messages occurring within specified time range

Syntax

extracted = extractTime(message,starttime,endtime)

Description

example

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

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 withing the specified time range.

See Also

Functions

Introduced in R2009a

Was this topic helpful?