Main Content


Convert OPC HDA data object array to single matrix



Vsingle = single(DObj) converts the OPC HDA data object array DObj into a matrix of data type single.

DObj must have the same time stamps for each of the Item IDs (elements of DObj), otherwise an error is generated. Use tsunion, tsintersect, or resample to generate an OPC HDA data object containing the same time stamp for all items in the object.


collapse all

Load the OPC HDA example data file, convert the hdaDataSmall object to have the same time stamps, and create a matrix of type single from the result.

load opcSampleHdaData;
dUnion = tsunion(hdaDataSmall);
Vsingle = single(dUnion);

Input Arguments

collapse all

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

Output Arguments

collapse all

OPC HDA data values, returned as a matrix of single type. Vsingle is constructed as an M-by-N matrix of single values, where M is the number of items in DObj and N is the number of time stamps in the array.

Version History

Introduced in R2011a

See Also