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