This is machine translation

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

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


Class: opc.hda.Data
Package: opc.hda

Convert OPC HDA Data object array to single type matrix


V = single(DObj)


V = single(DObj) converts the OPC HDA aata object array DObj into a matrix of data type single. V is constructed as an M-by-N array of single values, where M is the number of items in DObj and N is the number of time stamps in the array.

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.


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);
Was this topic helpful?