Convert OPC HDA data object array to int8 matrix
V = int8(DObj)
V = int8(DObj) converts the OPC HDA Data object array DObj into an int8 matrix. V is constructed as an M-by-N array of int8 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 an int8 matrix from the result:
load opcdemoHDAData; dUnion = tsunion(hdaDataSmall); vInt8 = int8(dUnion);