Pointer Setting for identifying time of corresponding data

4 次查看(过去 30 天)
I have a set of Data which has been optimised by Matlab. This Output Data is a matrix and after optimisation the decimal input values get converted into binary output values of 9 bits per value. Each set of 9 values in it corresponds to data for a set of time.
I need to now set a pointer to tell which set of 9 values belongs to which time step and onward based on its position. I'm quite puzzled on this issue, could anyone please advise me on how I could approach this issue?
For my data, 9 values represents 1 hour of data for 1 device and i have 105 hours of recording for 10 devices so 9450 (945x10) values in this matrix. Thanks!
  2 个评论
AJ von Alt
AJ von Alt 2014-1-20
编辑:AJ von Alt 2014-1-20
Can you clarify what the output of the "pointer" should be with an example? Do you have a vector of time stamps that you are trying to match with the data or do you want to generate your own time stamps?
Sam
Sam 2014-1-21
Hi AJ.. i had just updated my question.. just realised that i forgot to add in something to my question.
For your clarification.. I have a matrix of time stamps i am trying to match to and i need every 9 values in this matrix to correspond to a respective time stamp. EG values 1-9 is for time 0000H of device 1, values 10-18 for 0000H of device 2, values 19-27 for 0000H of device 3 and onward.
This is why i am looking for a pointer to move to respective blocks of the data and capture the data.. Thanks!

请先登录,再进行评论。

采纳的回答

AJ von Alt
AJ von Alt 2014-1-21
Let's see if I have your situation right.
Your measurements are stored in a 9450x10 matrix where each row is a row corresponds to a measurement time and each column corresponds to a device.
Your time stamp is a 105 x 1 cell array where each element is a string containing the timestamp associated with 9 measurements made for each of the 10 devices during that hour. So each time stamp is associated with 90 different measurements.
You want a way of looking at something like measurement 12 on device 8 and figuring out that the time stamp is '0001H' .
In that case, you can associate each row of measurements with a time stamp by creating a 945x1 time stamp array. If your initial time stamp array is called baseTsArray, and you make 9 measurement per hour:
measurementsPerHour = 9;
expandedTsArray = reshape( repmat( baseTsArray , 1 , measurementsPerHour)' , [] , 1);
The new time stamp array would look like this:
expandedTsArray =
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0002H'
...
'0105H'
'0105H'
'0105H'
'0105H'
The time stamp associated with data(n,D) would be given by expandedTsArray{n} .

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by