Hauptinhalt

arrayHasSameTimeStamp

Verify if all elements in OPC HDA data object have same timestamp

Description

sameTimestamp = arrayHasSameTimeStamp(dObj) returns true if all the elements of dObj have the same timestamp.

example

Examples

collapse all

Load the OPC HDA example data file and verify if all the elements of the hdaDataSmall object have the same timestamp.

load opcSampleHdaData;
tf = arrayHasSameTimeStamp(hdaDataSmall);
tf =

  logical

   0

Form a new data set using tsunion, and verify if all elements have the same timestamp.

hdaUnion = tsunion(hdaDataSmall);
unionSameTimestamp = arrayHasSameTimeStamp(hdaUnion)
unionSameTimestamp =

  logical

   1

Input Arguments

collapse all

Raw OPC HDA data, specified as an OPC HDA data object.

Output Arguments

collapse all

Indication that data object array has same timestamp, returned as logical 1 or 0. A value of 1 indicates that all the elements in the data object array have the same timestamp.

Version History

Introduced before R2006a

See Also

Functions