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

Messages occurring within specified time range

Syntax

extracted = extractTime(message,starttime,endtime)

Description

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

Input Arguments

message

Messages, specified as an array of CAN message objects

starttime

Beginning of the time range, specified in seconds. Returns messages with a timestamp greater than or equal to the specified start time.

endtime

End of the time range, specified in seconds. Returns messages with a timestamp up to and including the specified end time.

Output Arguments

extracted

Returned array of CAN message objects whose messages occur within starttime and endtime, inclusive.

Examples

msgRange = extractTime(message,5,10.5)
msgRange = extractTime(message,0,60)
msgRange = extractTime(message,150,Inf)

More About

collapse all

Tips

Specify the time range in increasing order from starttime to endtime. If you must specify the largest available time, endtime also accepts Inf as a valid value. The earliest acceptable time you can specify for starttime is 0.

See Also

Functions

Introduced in R2009a

Was this topic helpful?